Could be as simple as: <form method="post">{% csrf_token %}{{ form }}<input 
type="submit" value="Login"></form>

On Tuesday, March 3, 2015 at 9:32:48 AM UTC-5, Ilya Kazakevich wrote:
>
> I agree: adding template from example is good idea! And I believe it will 
> be used at least by newbies who just study Django auth system and by people 
> who just need prototype. Providing default is better than copy/pasting 
> example from docs.
>
> On Tuesday, March 3, 2015 at 5:26:10 PM UTC+3, Marc Tamlyn wrote:
>>
>> I can see the merit of including our documented example as an actual 
>> template as a starting point. It's unlikely to be used exactly as is very 
>> often but it reduces getting started friction for some users - "huh this 
>> view doesn't work, better go read the docs"
>>
>> I'd perhaps be inclined to include it without styles even.
>>
>> Marc
>>
>> On 3 March 2015 at 14:22, Ilya Kazakevich <[email protected]> wrote:
>>
>>> I do not think admin templates should used. But something very simple 
>>> and dumb (that looks similar to browser HTTP auth window). Here is example: 
>>> http://pastebin.com/nnX36RB6
>>> Css should be moved to static files, of course, to make this template 
>>> cleaner and slightly more customizable. 
>>>
>>> Imagine I need to create working solution as fast as I can. I really do 
>>> not care about good UI now, because I need only a prototype to show it to 
>>> my customer. I will not spent time creating nice login page: I just simply 
>>> copy/paste template from Django documentation. And login page from contrib 
>>> is great aid here. I will probably change login page UI later, but it is 
>>> minor issue and priority is low. Many people in Intranet solutions 
>>> (portals, CRMs and so on) are happy with browser HTTP auth window. They 
>>> really do not care about how ugly is it.
>>>
>>>
>>>
>>>
>>> On Tuesday, March 3, 2015 at 4:36:52 PM UTC+3, Tim Graham wrote:
>>>>
>>>> The admin templates extend "admin/base_site.html" and rely on the 
>>>> presence of specific template blocks so I don't think it's appropriate for 
>>>> those dependencies to be added to contrib.auth. I'm curious to see what 
>>>> content you would propose for a default template. Typically I've seen 
>>>> login 
>>>> templates that extend from a project's base template so it inherits all 
>>>> the 
>>>> project specific styles, JavaScript, etc. I'm not sure a default template 
>>>> would actually be used much in practice.
>>>>
>>>> On Tuesday, March 3, 2015 at 8:18:39 AM UTC-5, Tino de Bruijn wrote:
>>>>>
>>>>> Yeah, or default to admin/login.html. The admin ships with all 
>>>>> necessary "registration" templates, but for some reason only the 
>>>>> login.html 
>>>>> is included in the admin directory.
>>>>>
>>>>> On Tue, Mar 3, 2015 at 2:05 PM, Ilya Kazakevich <[email protected]> 
>>>>> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> When I use Django auth, I need to provide login.html myself. But 
>>>>>> Django encourages applications to have default templates which can be 
>>>>>> overwritten by user (via filesystem.Loader, for example). 
>>>>>> I suggest to provide default login.html with simple HTML form. User 
>>>>>> may always overwrite it.
>>>>>>
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Django developers (Contributions to Django itself)" 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-developers.
>>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>>> msgid/django-developers/9487d6c7-8ee2-4a64-aae6-
>>>>>> 9a05574c1464%40googlegroups.com 
>>>>>> <https://groups.google.com/d/msgid/django-developers/9487d6c7-8ee2-4a64-aae6-9a05574c1464%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 developers (Contributions to Django itself)" 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-developers.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-developers/aae4454c-7823-41cc-aaf2-914eb7b7c95f%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/django-developers/aae4454c-7823-41cc-aaf2-914eb7b7c95f%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 developers  (Contributions to Django itself)" 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-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/49d81fa0-0b33-41b8-8d98-f5cc0328554a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to