Django AllAuth How do you Customize your own HTML or CSS -


{% extends "account/base.html" %}  {% load url future %} {% load i18n %}  {% block head_title %}{% trans "signup" %}{% endblock %}  {% block content %}  </style> <h1><b>free membership</b>sign today</h1> <h1>{% trans "sign up" %}</h1>  <p>{% blocktrans %}already have account? please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p>  <form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">   {% csrf_token %}   {{ form.as_p }}   {% if redirect_field_value %}   <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />   {% endif %}   <button type="submit">{% trans "sign up" %} &raquo;</button> </form>  <h1><b>free membership</b>sign today</h1> {% endblock %} {% block content2 %} {% endblock %} 

this original code django auth.

what want bring more life add better html5 or css when not change?

you can put custom templates allauth in template directory under account folder. django allauth take custom template , renders it.

following sample signup page have created days ago:

{% extends "base.html" %} {% load staticfiles %} {% load socialaccount %}  {% block extra_body %}account-bg{% endblock %}  {% block partial %}     <div class="container">         <div class="row">           <div class="account-form-container">             <div class="row">               <div class="col-md-12">                 <h3>create new account</h3>               </div>             </div>             <div class="row">                     <form class="form-horizontal signup-form" id="usersignupform" action="{% url "account_signup" %}" method="post" role="form">                     {% csrf_token %}                     {% if request.get.next %}                         <input type="hidden" name="next" value="{{request.get.next}}">                     {% endif %}                      {% if form.non_field_errors %}                     <div class="fieldwrapper alert alert-danger">                         <ul>                         {% error in form.non_field_errors %}                                 <li>{{ error | lower}}</li>                         {% endfor %}                         </ul>                     </div>                     {% endif %}                         <div class="col-lg-12">                             <div class="form-group inner-addon left-addon {% if form.email.errors %}has-error{% endif %}">                                 <i class="icon-user"></i>                                 <input class="form-control login-field" type="text" id="id_email" name="email" placeholder="email">                                 <span class="help-block">{{ form.email.errors }}</span>                             </div>                             <div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}">                                 <i class="icon-lock"></i>                                 <input class="form-control login-field" type="password" id="id_password1" name="password1" placeholder="password">                                 <span class="help-block">{{ form.password1.errors }}</span>                             </div>                              <div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}">                                 <i class="icon-lock"></i>                                 <input class="form-control login-field" type="password" id="id_password2" name="password2" placeholder="confirm password">                                 <span class="help-block">{{ form.password1.errors }}</span>                             </div>                              <div class="form-group">                               <div class="col-md-5">                                 <button type="submit" class="btn btn-complete btn-bold pull-right">sign up</button>                               </div>                             </div>                         </div>                     </form>                 </div>             </div>         </div>     </div> {% endblock %} 

i hope you.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -