Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

1,918 views
Skip to first unread message

VVilku

unread,
Mar 13, 2013, 9:33:42 AM3/13/13
to django...@googlegroups.com
Hello,
I have problem with:

Reverse for 'django.contrib.auth.views.login' with arguments '()' and keyword arguments '{}' not found.


Request Method:     GET
Request URL:     http://www.django-phpbb.pl:8000/blog/accounts/login/
Django Version:     1.5
Exception Type:     NoReverseMatch
Exception Value:    

Reverse for 'django.contrib.auth.views.login' with arguments '()' and keyword arguments '{}' not found.


blog/urls.py:
urlpatterns = patterns('',
                       url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login1'),
                       url(r'^accounts/logout/$', 'django.contrib.auth.views.logout'),
)

blog/templates/registration/login.html:
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">

I try without quotes, but I receive another error (I know, in django 1.5 are a some changes in url tag):

'url' requires a non-empty first argument. The syntax changed in Django 1.5, see the docs.

I tried to use only name ("login" -> {% url 'login1' %} and {% url 'login1' %} ). Also, it does not work.
(Reverse for 'login1' with arguments '()' and keyword arguments '{}' not found.)


Any suggestions?

regards,
VVilku

django_auth_problem.rar

Tom Evans

unread,
Mar 13, 2013, 10:38:38 AM3/13/13
to django...@googlegroups.com
Did you omit to add 'blog' to settings.INSTALLED_APPS?

Cheers

Tom

VVilku

unread,
Mar 13, 2013, 2:14:11 PM3/13/13
to django...@googlegroups.com
No, I dont't. :)
The attachment in the first post it is my attempt to isolate the problem.
(assumption "blog"=="atest")

Alexey Kinyov

unread,
Mar 13, 2013, 3:46:41 PM3/13/13
to django...@googlegroups.com
Hi VVilku!

It should work if you remove `namespace='atest'` from 'auth_project/urls.py'.


regards,
Alex
///
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Mike Doroshenko II

unread,
Mar 13, 2013, 3:57:33 PM3/13/13
to django...@googlegroups.com
Django phpBB?

I've used phpBB before, and am curious about importing a phpBB forum
into Django.

I am curious what that site is, but when I go there I get nothing :(
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.

--
Mike Doroshenko, Junior Sys Admin
TecKnoQuest Inc.
mi...@tecknoquest.com
www.tecknoquest.com

VVilku

unread,
Mar 13, 2013, 4:33:00 PM3/13/13
to django...@googlegroups.com
Thanks a lot :)
You're right.I did not notice it.

Working when add 'atest':
<form method="post" action="{% url 'atest:login1' %}">
or
<form method="post" action="{% url 'atest:django.contrib.auth.views.login' %}">
or
when remove this namespace from project/urls.py.

regargs

VVilku

unread,
Mar 13, 2013, 4:41:35 PM3/13/13
to django...@googlegroups.com, mi...@tecknoquest.com
Django and phpBB3: I was just checking possibilities connectivity between Django and phpBB.

Maybe DjangoBB interest you.

Migration & connection: https://github.com/jedie/django-phpBB3

regargs,

Alexey Kinyov

unread,
Mar 14, 2013, 2:56:10 AM3/14/13
to django...@googlegroups.com
You are welcome! :)
Alex
///
Reply all
Reply to author
Forward
0 new messages