joke2k / joke2k/django-options
'GeneralsAdminPage' object has no attribute 'request'
- Dominant language
- Python
- Stars
- 30
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
following the tutorial, I end up with the error indicated in the subject. I even get it with the testapp that comes with the package.
Bellow is the full call stack
I assume I must be doing something wrong, but I can't find out what.
Any pointer for me please?
Thanks a lot.
Environment:
Request Method: GET
Request URL: http://localhost:8000/admin/django_options/option/page-generals/
Django Version: 1.6.2
Python Version: 2.7.5
Installed Applications:
('django_options',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.comments',
'django.contrib.flatpages',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
'picklefield',
'app')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.doc.XViewMiddleware',
'django_options.middleware.OptionsLoaderMiddleware')
Traceback:
File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response
1. response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/Users/chris/Documents/workspace/test_django-options/django_options/options.py" in wrapper
2. return admin_site.admin_view(view)(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/django/utils/decorators.py" in _wrapped_view
3. response = view_func(request, _args, *_kwargs)
File "/Library/Python/2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
4. response = view_func(request, _args, *_kwargs)
File "/Library/Python/2.7/site-packages/django/contrib/admin/sites.py" in inner
5. return view(request, _args, *_kwargs)
File "/Library/Python/2.7/site-packages/django/contrib/admin/views/decorators.py" in _checklogin
6. return view_func(request, _args, *_kwargs)
File "/Users/chris/Documents/workspace/test_django-options/django_options/options.py" in view
7. return pageView.dispatch(request, _args, *_kwargs)
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in dispatch
8. return handler(request, _args, *_kwargs)
File "/Users/chris/Documents/workspace/test_django-options/django_options/options.py" in get
9. return self.render_to_response(self.get_context_data(**context))
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in render_to_response
10. request = self.request,
Exception Type: AttributeError at /admin/django_options/option/page-generals/
Exception Value: 'GeneralsAdminPage' object has no attribute 'request'
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the tutorial or bundled testapp request at the reported admin URL, then start with django_options/options.py, especially the wrapper, view, and get methods named in the traceback. Trace how the page view is created and dispatched, and consider the issue resolved when the page renders without the reported AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100