#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]


Attachments (0)

Change History (1)

comment:1 Changed 16 months ago by bmispelon

  • Cc bmispelon@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed


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:

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.