[Fixed]-Is it possible to implement django login-authentication with out writing my own template?

1👍

No, Django does not come with a login template. From the authentication docs:

It’s your responsibility to provide the html for the login template, called registration/login.html by default.

If Django came with a login template, it would probably look basic. Django doesn’t know template structure, so wouldn’t be able to inherit from your base template. So most people would end up creating a custom login template anyway. However, it would be easier for new users if Django included a template, however basic it looked.

Note that the authentication docs includes a sample template that you can use.

As an aside, you should either include ‘django.contrib.auth.urls’, or add entries for login and logout to your app’s urls (this allows you to override the template name). You don’t need to do both.

Leave a comment