I got it, thank you.

Yen

2014-11-20 20:18 GMT+08:00 Daniel Roseman <[email protected]>:

> On Thursday, 20 November 2014 11:39:09 UTC, Yen wrote:
>>
>> Hi,
>>
>> I follow the doc to test the login system. I set a view function with
>> @login_required to show successful login message.
>>
>> In the html, a link like:
>> <li><a href="{% url 'account:login' %}">Login</a></li>
>>
>> The URLconf under 'account' namespace contains one url:
>>     url(r'^login/$', 'django.contrib.auth.views.login', name='login',)
>>
>>
>> It shows the exceptions, and I show the traceback here:
>>
>>
>>
>>
>>
>>
>>
>> *Template Loader Error:Django tried loading these templates, in this
>> order:Using loader django.template.loaders.filesystem.Loader:<my
>> project>/templates/registration/login.html (File does not exist)Using
>> loader
>> django.template.loaders.app_directories.Loader:/usr/local/lib/python3.2/dist-packages/django/contrib/admin/templates/registration/login.html
>> (File does not
>> exist)/usr/local/lib/python3.2/dist-packages/django/contrib/auth/templates/registration/login.html
>> (File does not exist)*
>> I found one login.html in 'django/contrib/admin/
>> templates/admin/login.html'.
>> Is it a bug or I miss something?
>>
>> Yen
>>
>
> There is no default login template. If you want a login form, you need to
> provide a template. See the docs at
> https://docs.djangoproject.com/en/1.7/topics/auth/default/#django.contrib.auth.views.login
> :
> "It’s your responsibility to provide the html for the login template ,
> called registration/login.html by default."
> --
> DR.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/94f9570d-e9dc-48da-8571-85a2eb3dc984%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/94f9570d-e9dc-48da-8571-85a2eb3dc984%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFnq%3D1iExGvd9e1LKk5mJM%3D0bQvccRkhBK9h-F_poBZgnEz_sQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to