Opened 6 years ago

Closed 6 years ago

#20191 closed Uncategorized (invalid)

No Module Named App Name

Reported by: johnsonshara@… Owned by: nobody
Component: Python 2 Version: 1.5
Severity: Normal Keywords:
Cc: bmispelon@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I have Created the Project and App using Python And Django.
This is My Model in my

class Poll(models.Model):

question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')

Now When run import Poll though python shell , it gives no module name Poll.

Project Structure :
mysite [project name]

files under mysite

polls [my app]


Change History (1)

comment:1 Changed 6 years ago by Baptiste Mispelon

Cc: bmispelon@… added
Resolution: invalid
Status: newclosed


This site is for reporting bugs against django. For support, you should try the django-users mailing list or the #django channel on IRC:

As for your issue, you're not importing the right module.

In python, the module's name if the name of the file, so you shouldn't be importing Poll.

Rather, you should do from polls.models import Poll, as described in the tutorial:

Note: See TracTickets for help on using tickets.
Back to Top