NoReverseMatch at /admin/auth/user using mongoDB engine causes inability to edit auth.users

438 views Asked by At

I'm using django-nonrel version 15.5, and djangotoolbox. I have a problem with adding users in the admin-ui that are not a super-users: When entering the Auth segment -> Users -> Add User -> I input a name and a password and press save-> I get the following Error:

NoReverseMatch at /admin/auth/user/52b0a33c6041d841503fe202/

Reverse for 'view_on_site' with arguments '(u'52b08bb06041d83a28de0de0', u'52b0a33c6041d841503fe202')' and keyword arguments '{}' not found.

Error during template rendering

In template C:\Python27\temp\vcb\lib\site-packages\django\django\contrib\admin\templates\admin\change_form.html, error at line 33

I've noticed the users got created when re-visiting the admin/auth/user/ page. is it necessary to extend the change_form template for it to work? If so, what should I change it to?

The auth.user is suppose to work with the django-nonrel 1.5.5 version, djangotoolbox and mongodb-engine.

EDIT:

I've updated to django-nonrel 1.6 beta, and now I get the following Exception Value:

Reverse for 'view_on_site' with arguments '(u'52b196426041d84938abff63', u'52b1968c6041d8503ce96df6')' and keyword arguments '{}' not found. 1 pattern(s) tried: [u'admin/r/(?P\d+)/(?P.+)/$']

So I was wondering about this pattern tried; ids in MongoDB are not of format d+ but a long string combining letters and digits, so maybe the url defined in my projecct's urls.py is not appropriate? it's url(r'^admin/', include(admin.site.urls)),

Help would be much appriciated,

Nitzan

1

There are 1 answers

0
Morty On

I got the same issue on Ubuntu and django-nonrel-1.5.* and fixed it by this command

sudo pip install git+https://github.com/django-nonrel/django -I 

It maybe works for you too.