from .models import mdb
Please do import this class in views.py

On Sun, Jul 8, 2018, 6:42 PM <[email protected]> wrote:

> hi all
> help plz :)
> as brief i am using django an linux
> i create project and app in this project called movies
> in models i create 2 classes mdb and mm
> in views when i try to import class from model.py give me error
>
> from .models import mdb
> output:
>
> Traceback (most recent call last):
> File "/root/Desktop/website/movies/views.py", line 4, in <module>
> from .models import mdb
> ValueError: Attempted relative import in non-package
>
> any ideas ? thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9c603e4c-5b68-4b0e-bfc4-7d23d410927e%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/9c603e4c-5b68-4b0e-bfc4-7d23d410927e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAupS980Jq9_PZAJuOSB%2BnLyc%2BWqd7zrxGVkN9vHBCS%3DG-Gr6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to