Opened 16 years ago
Closed 16 years ago
#10982 closed (invalid)
In the tutorial part 2, when I reached the point were we tried "StackeInLine", there was and error.
Reported by: | pc | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 1.0 |
Severity: | Keywords: | tutorial, StackedInLine | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
AttributeError at /admin/polls/poll/
'module' object has no attribute 'StackedInLine'
Request Method: GET
Request URL: http://localhost:8000/admin/polls/poll/
Exception Type: AttributeError
Exception Value:
'module' object has no attribute 'StackedInLine'
Exception Location: /home/pc/python/django/mysite/../mysite/polls/admin.py in <module>, line 4
Python Executable: /usr/bin/python
Python Version: 2.5.2
Environment:
Request Method: GET
Request URL: http://localhost:8000/admin/polls/poll/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'mysite.polls']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response
- request.path_info)
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in resolve
- for pattern in self.urlconf_module.urlpatterns:
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in _get_urlconf_module
- self._urlconf_module = import(self.urlconf_name, {}, {}, [])
File "/home/pc/python/django/mysite/../mysite/urls.py" in <module>
- admin.autodiscover()
File "/usr/lib/python2.5/site-packages/django/contrib/admin/init.py" in autodiscover
- import("%s.admin" % app)
File "/home/pc/python/django/mysite/../mysite/polls/admin.py" in <module>
- class ChoiceInLine(admin.StackedInLine):
Exception Type: AttributeError at /admin/polls/poll/
Exception Value: 'module' object has no attribute 'StackedInLine'
Ubuntu 8.04
Using sqlite3
All was working fine until the "StackedInLine"
My admin.py:
from mysite.polls.models import Poll, Choice
from django.contrib import admin
class ChoiceInLine(admin.StackedInLine):
class PollAdmin(admin.ModelAdmin):
admin.site.register(Poll, PollAdmin)