Is there a built-in login template in Django?

前端 未结 6 1687
臣服心动
臣服心动 2020-12-12 11:48

I want to let a user sign in before seeing pages. Is there any built-in template for user sign in, so that I do not have to write my own sign in page?

6条回答
  •  有刺的猬
    2020-12-12 11:49

    The most upvoted response by @brant is technically incorrect. Django provides default views to handle login functionality but per the documentation does not provide a template:

    Django provides no default template for the authentication views. You should create your own templates for the views you want to use. The template context is documented in each view, see All authentication views.

提交回复
热议问题