Thursday, September 2, 2010

Re: Can't login to admin site

On Sep 2, 6:58 am, Karen Tracey <kmtra...@gmail.com> wrote:
> On Wed, Sep 1, 2010 at 1:23 PM, vgarvardt <vgarva...@gmail.com> wrote:
> > Django 1.2.1
>
> > Created new project, set DB settings (postgresql_psycopg2),
> > MEDIA_ROOT, MEDIA_URL, TEMPLATE_DIRS, added django.contrib.admin to
> > INSTALLED_APPS.
>
> > In urls.py uncommented:
> > from django.contrib import admin
> > admin.autodiscover()
>
> > and
>
> > (r'^admin/', include(admin.site.urls)),
>
> > Run manage.py syncdb - tables and superuser were successfully created.
> > Run manage.py runserver, openedhttp://127.0.0.1:8000/admin/in
> > browser - got admin site login page, entered superuser login/pwd,
> > pressed Login button and got django debug error page:
>
> > TypeError at /admin/
>
> > add() takes at most 6 arguments (7 given)
>
> > Request Method:         POST
> > Request URL:    http://127.0.0.1:8000/admin/
> > Exception Type:         TypeError
> > Exception Value:
>
> > add() takes at most 6 arguments (7 given)
>
> > Exception Location:     /usr/local/lib/python2.6/dist-packages/django/db/
> > models/base.py in _collect_sub_objects, line 558
> > Python Executable:      /usr/bin/python
> > Python Version:         2.6.5
> > etc.
>
> > What am I doing wrong?
>
> The full traceback would help diagnose. Is there any possibility your
> installation of Django is corrupt -- like from a partially-applied install
> of 1.2.1 over 1.1? That's rather what it looks like.
>
> Karen
> --http://tracey.org/kmt/

Yes, I installed 1.2.1 over 1.1, but I did not get any error message
on installation. Will try to reinstall.

Here is backtrace:

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.2.1
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
base.py" in get_response
101. response = callback(request,
*callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/
sites.py" in wrapper
207. return self.admin_view(view, cacheable)(*args,
**kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/utils/
decorators.py" in _wrapped_view
76. response = view_func(request, *args,
**kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/
cache.py" in _wrapped_view_func
69. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/
sites.py" in inner
189. return self.login(request)
File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/
cache.py" in _wrapped_view_func
69. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/
sites.py" in login
342. login(request, user)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/
__init__.py" in login
78. request.session.cycle_key()
File "/usr/local/lib/python2.6/dist-packages/django/contrib/sessions/
backends/base.py" in cycle_key
250. self.delete(key)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/sessions/
backends/db.py" in delete
76.
Session.objects.get(session_key=session_key).delete()
File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py"
in delete
636. self._collect_sub_objects(seen_objs)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py"
in _collect_sub_objects
558. type(parent), parent, nullable):

Exception Type: TypeError at /admin/
Exception Value: add() takes at most 6 arguments (7 given)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment