Python Django Authentication Authentication LoginView

Django Authentication- LoginView, Challenge Task 2 of 2, Task 1 no longer passing, code review help?

Would like guidance on what is causing my code to fail.

The first task of the challenge is to add a new route for r"^" that includes Django's auth URLs.

urlpatterns = [ url(r'^', include('django.contrib.auth.urls')), ]

The second task is to update the login template. Add the appropriate HTML to display theform to the template and an <h1> that says "Log into your account".

Which I thought I did correctly, but received the error message that the first task is no longer passing. Is there something I'm missing?

accounts/urls.py
from django.conf.urls import url, include

from . import views

urlpatterns = [
    url('^', include('django.contrib.auth.urls')),
]
templates/registration/login.html
{% extends "layout.html" %}
{% load bootstrap3 %}

{% block title_tag %}Login | {{ block.super }}{{% endblock %}

{% block body_content %}
<div class="container">
  <h1>Log into your account</h1>
  <form method="POST">
    {% csrf_token %}
    {% bootstrap_form form %}
    <input type="submit" value="Login" class="btn btn-default">
  </form>  
</div>
{% endblock %}

1 Answer

Literally just did this challenge myself. You're just overthinking the template.

<h1>Log into your account</h1>
<form method="POST">
  {% csrf_token %}
  {{ form.as_p }}
  <input type="submit" value="Log in">
</form>
Bernardo Augusto García Loaiza
Bernardo Augusto García Loaiza
Pro Student 792 Points

I understand, the system check the answer in the task 2 in relation to the way in which Django will do, without bootstrap form ... and so.