Closed GoogleCodeExporter closed 9 years ago
In templates/base.html I link to a few views in myapp, so you have to change the
template, too.
Original comment by wkornew...@gmail.com
on 17 Feb 2009 at 9:47
Sorry Waldemar, I have copy pasted error that i had previously that have you
pointed
to that conclusion. The problem was the *settings* part in reverse link.
Now I have both apps disabled and I'm showing home page main.html using below
content:
{% if user.is_authenticated %}
Welcome, {{ user.username }}!
<a href="{% url django.contrib.auth.views.logout %}">Logout</a>
{% else %}
<a href="{% url django.contrib.auth.views.login %}">Login</a>
No usage of base and other views url. I'm getting the below error:
NoReverseMatch: Reverse for 'settings.django.contrib.auth.views.logout' with
arguments '()' and keyword arguments '{}' not found.
I've also tested simpler change: just enable Google Auth Middleware and remove
registration app to get the error with above main.html file content.
Original comment by jonca.rafal
on 18 Feb 2009 at 5:48
Do you integrate ragendja.auth.urlsauto.urlpatterns (like in the latest sample
project, see auth_patterns)? If not, then "registration" is the only app that
defines
urls for those views and if you remove it there indeed is no reverse match.
Original comment by wkornew...@gmail.com
on 18 Feb 2009 at 7:39
I think the problem is different:
The reverse is looking for: 'settings.django.contrib.auth.views.logout' not
'django.contrib.auth.views.logout'. If i simulate the
'settings.django.contrib.auth.views.logout' in ragendja.auth by adding
settings. to
name, everything works. But in general the reverse shouldn't be looking for
settings.*something. I'm try to test it further in the evening.
Regadija is in installed paths and I have checked: ragendja.auth.urlsauto is
executed. Django adds reverse for 'django.contrib.auth.views.logout', just then
the
above main.html strangely is looking for
'settings.django.contrib.auth.views.logout'...
Original comment by jonca.rafal
on 18 Feb 2009 at 8:48
I'm sorry. I've found your issue. It looks like naming a pattern by some
existing
function's import path breaks Django's reverse() function.
BTW, I've often seen Django say that it can't find the reverse for
"settings.xxx",
but it actually tried to find "xxx". I don't know why this is happening.
Original comment by wkornew...@gmail.com
on 18 Feb 2009 at 9:29
why the status if fixed and I am still bothered by this
Original comment by xiaona...@gmail.com
on 28 Mar 2009 at 4:05
Please post a complete traceback.
Original comment by wkornew...@gmail.com
on 29 Mar 2009 at 10:42
Original issue reported on code.google.com by
jonca.rafal
on 17 Feb 2009 at 8:09