Below are two forms, the login form (top) and a bootstrap form (bottom), 
I'm trying to apply bootstrap to the login page, how can I integrate 
bootstrap onto the login objects, e.g. {{ form.username }} is the entire 
textbox, so I'm at a loss being a beginner with Django (my first week).

        {% if form.errors %}
        <p>Your username and password didn't match. Please try again.</p>
        {% endif %}
        
        {% if next %}
        {% if user.is_authenticated %}
        <p>Your account doesn't have access to this page. To proceed,
          please login with an account that has access.</p>
          {% else %}
          <p>Please login to see this page.</p>
          {% endif %}
          {% endif %}
          
          <form method="post" action="{% url 'login' %}">
            {% csrf_token %}
            <div>
              <td>{{ form.username.label_tag }}</td>
              <td>{{ form.username }}</td>
            </div>
            <div>
              <td>{{ form.password.label_tag }}</td>
              <td>{{ form.password }}</td>
            </div>
          </form>
          <form method="post" action="{% url 'login' %}">
            <div>
              <input type="submit" value="login" />
              <input type="hidden" name="next" value="{{ next }}" />
            </div>
            <input type="text" class="form-control" placeholder="Email" 
required autofocus>
            <input type="password" class="form-control" 
placeholder="Password" required>
            <button class="btn btn-lg btn-primary btn-block" type="submit">
              Sign in</button>
              <label class="checkbox pull-left">
                <input type="checkbox" value="remember-me">
                Remember me
              </label>
              <a href="#" class="pull-right need-help">Need help? </a><span 
class="clearfix"></span>
            </form>


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3aa17d90-3959-4b16-8c14-93c966fb45d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to