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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

Ansible warning on jinja2 braces on when -