python - I am trying to import a models.py method, but get error no module named -


i have 2 apps:

friends/apps/loginreg/models.py/user
friends/apps/friends/views.py

i trying import user method views.py file.

these imports:

from __future__ import unicode_literals .models import friend loginreg.models import user django.shortcuts import render, redirect 

it continues give error no module named loginreg.models

the 'from' path wrong, think. try from ..loginreg.models import user

you're trying import folder above current one. can read more here.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -