#8916: admin auth change password not working
-------------------------------------------+--------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: closed | Milestone:
Component: django.contrib.admin | Version: 1.0
Resolution: invalid | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Comment (by donkeyhotty):
Hi, I'm leaving this ticket closed because I'm a complete newb, and I
don't have the experience to figure out whether this is my fault or not.
But for what it's worth I seem to have exactly the same problem as a few
other people here. Traceback is below. It's what I get when I click the
"change password form" link in the Django Administration when editing a
User. Besides adding
[[BR]]
admin.site.register(User)
[[BR]]
admin.site.register(Group)
[[BR]]
to the admin.py in my app, I haven't done anything else to monkey with
User. At the top of the same file, I import:
[[BR]]
from django.contrib import admin
[[BR]]
from models import *
[[BR]]
from datetime import datetime
[[BR]]
from django.contrib.auth.models import Group, User
[[BR]]
That's it.
After googling, I've found that if I create a password in the Python
interpreter like this:
[[BR]]
>>> import md5
[[BR]]
>>> md5.new('test').hexdigest()
[[BR]]
'098f6bcd4621d373cade4e832627b4f6'
[[BR]]
and then paste 098f6bcd4621d373cade4e832627b4f6 into the field, when I
come back after saving it, it's been converted to a sha encrypted password
and I can log in successfully with the new password. But a) this isn't
feasible for regular users of the admin panel, and b) the "change password
form" link remains broken in any case.
My apologies in advance if I've left something important out.
[[BR]]
{{{
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/auth/user/2/password/
Django Version: 1.1 pre-alpha SVN-9613
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.flatpages',
'd_utilities.oofle',
'adminStuff']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')
Traceback:
File "C:\Python25\lib\site-packages\django\core\handlers\base.py" in
get_response
86. response = callback(request, *callback_args,
**callback_kwargs)
File "C:\Python25\lib\site-packages\django\contrib\admin\sites.py" in root
157. return self.model_page(request, *url.split('/', 2))
File "C:\Python25\lib\site-packages\django\views\decorators\cache.py" in
_wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "C:\Python25\lib\site-packages\django\contrib\admin\sites.py" in
model_page
176. return admin_obj(request, rest_of_url)
File "C:\Python25\lib\site-packages\django\contrib\admin\options.py" in
__call__
197. return self.change_view(request, unquote(url))
File "C:\Python25\lib\site-packages\django\db\transaction.py" in
_commit_on_success
238. res = func(*args, **kw)
File "C:\Python25\lib\site-packages\django\contrib\admin\options.py" in
change_view
548. obj = model._default_manager.get(pk=object_id)
File "C:\Python25\lib\site-packages\django\db\models\manager.py" in get
93. return self.get_query_set().get(*args, **kwargs)
File "C:\Python25\lib\site-packages\django\db\models\query.py" in get
303. clone = self.filter(*args, **kwargs)
File "C:\Python25\lib\site-packages\django\db\models\query.py" in filter
489. return self._filter_or_exclude(False, *args, **kwargs)
File "C:\Python25\lib\site-packages\django\db\models\query.py" in
_filter_or_exclude
507. clone.query.add_q(Q(*args, **kwargs))
File "C:\Python25\lib\site-packages\django\db\models\sql\query.py" in
add_q
1255. can_reuse=used_aliases)
File "C:\Python25\lib\site-packages\django\db\models\sql\query.py" in
add_filter
1198. self.where.add((alias, col, field, lookup_type, value),
connector)
File "C:\Python25\lib\site-packages\django\db\models\sql\where.py" in add
48. params = field.get_db_prep_lookup(lookup_type,
value)
File "C:\Python25\lib\site-packages\django\db\models\fields\__init__.py"
in get_db_prep_lookup
202. return [self.get_db_prep_value(value)]
File "C:\Python25\lib\site-packages\django\db\models\fields\__init__.py"
in get_db_prep_value
353. return int(value)
Exception Type: ValueError at /admin/auth/user/2/password/
Exception Value: invalid literal for int() with base 10: '2/password'
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/8916#comment:12>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---