ModuleNotFoundError: No module named :

68 views
Skip to first unread message

MEGA NATHAN

unread,
Sep 24, 2019, 12:09:33 AM9/24/19
to Django users
Hi.


i 'm meganathan from india i was doing django trining ,

And i have one dout .mo module name found models....

ModuleNotFoundError: No module named 'django.models'





Regards
Meganathan,
models.PNG
settings.PNG
views.PNG

Deep Sukhwani

unread,
Sep 24, 2019, 12:13:28 AM9/24/19
to django...@googlegroups.com
Are you supposed to be using a virtualenv and you don't have that activated?

Can you run pip freeze | grep -i django and share the output?

--
Regards
Deep L Sukhwani


--
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 django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f85f29b7-e3d9-4dfa-945f-70f1fb8e90f1%40googlegroups.com.

Abu Yusuf

unread,
Sep 24, 2019, 12:33:29 AM9/24/19
to django...@googlegroups.com
In your views.py:
from .models import users

That's it.

Abu Yusuf

unread,
Sep 24, 2019, 1:02:37 AM9/24/19
to django...@googlegroups.com
Error in admin.py. So same here in admin.py.

Before starting a django project, try to understand the architecture of it and the working flow of it.
Otherwise, you can't go long away.
Best Wishes,

Avi gehlot

unread,
Sep 24, 2019, 10:53:57 AM9/24/19
to django...@googlegroups.com
Yo put in admin.py 
Django.models import users 

But 
You put apptwo.models inport users 
This way ...

MEGA NATHAN

unread,
Sep 24, 2019, 12:44:37 PM9/24/19
to django...@googlegroups.com


Hi.
 again i change and run but same problem coming ....



Regards
Meganathan G



Abu Yusuf

unread,
Sep 25, 2019, 12:27:08 AM9/25/19
to django...@googlegroups.com
share your full project here.

MEGA NATHAN

unread,
Sep 25, 2019, 11:39:01 PM9/25/19
to django...@googlegroups.com

hi.

populate script error in line 12




Regards
Meganathan G



pop1.PNG

Rahul Roshan

unread,
Sep 26, 2019, 2:11:50 AM9/26/19
to django...@googlegroups.com
You have created a model named as "user" in models.py while you are importing model "User" in views.py. Importing model "user" will fix the issue.


Thanks,
Rahul

Perceval Maturure

unread,
Sep 28, 2019, 1:00:14 PM9/28/19
to django-users
dear team
my django cms is refusing to take in other templates when i select a different template, what could be the problem?

i am on django cms 3.7.0 , django 2.1 and python 3
regards


--
Perceval Maturure
083 303 9423

Deep Sukhwani

unread,
Sep 30, 2019, 9:40:04 AM9/30/19
to django...@googlegroups.com
Probably a good question for Django CMS community, mind posting it there?


--
Regards
Deep L Sukhwani


--
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 django-users...@googlegroups.com.

Raja Sekar Sampath

unread,
Oct 8, 2019, 1:38:07 PM10/8/19
to django...@googlegroups.com
Hi,

I'm facing challenges to get the result of below problem,I have two models in my application i.e.,


class UserMenu(models.Model):
    name = models.CharField(max_length=50)

    def __str__(self):
        return self.name


class MenuMapping(models.Model):

    user_menu = models.ManyToManyField(UserMenu, verbose_name='Menu')
    user_group = models.ForeignKey(Group, related_name='user_group', verbose_name='Department', on_delete=models.SET_NULL, null=True) # refers - auth.group which is linked with users


    def __str__(self):
        return self.user_group.name



Now I want to get the list of UserMenu mapped with the user_group of logged in user.

I could not able to get expected result with prefetch_related or select_related,

Can anybody help ??

--
Thanks & Regards,

Raja Sekar Sampath

Uzama Zaid Mohammed Jaward

unread,
Oct 9, 2019, 1:28:54 PM10/9/19
to django...@googlegroups.com
Hello there

Can anyone send resources on Clean Architecture in Django? 

Waqas Ali

unread,
Oct 9, 2019, 1:47:08 PM10/9/19
to django...@googlegroups.com
if anyone can have then plz share


On Wed, Oct 9, 2019 at 10:28 PM Uzama Zaid Mohammed Jaward <uzama...@gmail.com> wrote:
Hello there

Can anyone send resources on Clean Architecture in Django? 

--
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 django-users...@googlegroups.com.

Admilson de pina

unread,
Oct 9, 2019, 1:57:22 PM10/9/19
to django...@googlegroups.com

Uzama Zaid Mohammed Jaward <uzama...@gmail.com> escreveu no dia quarta, 9/10/2019 à(s) 18:28:
Hello there

Can anyone send resources on Clean Architecture in Django? 

--
Reply all
Reply to author
Forward
0 new messages