#26224: Tutorial Part 5 (Testing) Generates app_label error
---------------------------------+--------------------
Reporter: EricBLivingston | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------
I have been walking through the Tutorial for Django, and upon reaching
part 5 and introducing the first test case, I get this output (the
directory I put the tutorial in is called 'demo')
`RuntimeError: Model class demo.polls.models.Question doesn't declare an
explicit app_label and isn't in an application in INSTALLED_APPS.`
I tried adding a Meta section to the Question model, after doing some
poking around in the docs.
{{{
#!python
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
class Meta:
app_label='polls'
}}}
But then I get this:
`RuntimeError: Conflicting 'question' models in application 'polls':
<class 'polls.models.Question'> and <class 'demo.polls.models.Question'>.`
--
Ticket URL: <https://code.djangoproject.com/ticket/26224>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/058.4666c8ec37a9e7a1120b5debeab25141%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.