overriding default templates of django-allauth

前端 未结 7 1862
小鲜肉
小鲜肉 2020-12-09 02:22

I used this social registration/signup library django allauth for a project of mine. How do i customize the default templates and forms to give a better look and feel?

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 02:57

    To customize django-allauth after installing it, copy it from site-packages and paste it in your project apps directory. In this way the default allauth app and its templates being used will be those in your project's allauth app. Then if you want to modify signup.html of socialaccount then go to apps\allauth\templates\socialaccount\signup.html and modify it by editting inside 'block content' tag:

    {% block content %}
        // your customized html for signup form
    {% endblock %}
    

    Hope this will help you.

提交回复
热议问题