ModuleNotFoundError: No module named 'models'

1,507 views
Skip to first unread message

jinghui yang

unread,
May 29, 2017, 8:35:27 PM5/29/17
to Django users
ModuleNotFoundError: No module named 'models'

How to fix this error?

Dylan Reinhold

unread,
May 29, 2017, 9:06:53 PM5/29/17
to django...@googlegroups.com
Well simple fix is make sure you have a module named models.

Without the code no one is going to know what you did wrong.



On Mon, May 29, 2017 at 4:42 PM, jinghui yang <ad...@euktv.com> wrote:
ModuleNotFoundError: No module named 'models'

How to fix this error?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
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/0d6d1c8a-37e3-4024-863e-3befc271f5fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

VC

unread,
May 29, 2017, 9:26:47 PM5/29/17
to django...@googlegroups.com
from django.db import models

# Create your models here.
class Student(models.Model):
fname = models.CharField(max_length=50, null=True, blank=True) 

def __str__(self):
return self.fname

please try this

On Mon, May 29, 2017 at 7:42 PM, jinghui yang <ad...@euktv.com> wrote:
ModuleNotFoundError: No module named 'models'

How to fix this error?

--

m712 - Developer

unread,
May 29, 2017, 10:33:40 PM5/29/17
to jinghui yang, Django users

How do you expect us to understand your problem if you give us no context at all? For all I know this error could be a file system corruption.

On May 30, 2017 2:42 AM, jinghui yang <ad...@euktv.com> wrote:
ModuleNotFoundError: No module named 'models'

How to fix this error?

--
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.
Reply all
Reply to author
Forward
0 new messages