1👍
✅
Put the template in templates/rest_framework/
and
urlpatterns = [
url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')),
1👍
If you extended it on project/templates/rest_framework/login.html:
{% extends "rest_framework/login_base.html" %}
{% block branding %}
<h3 style="margin: 0 0 20px;">My site</h3>
{% endblock %}
The name of your project’s login form which is ‘my site’, shouldn’t change.
For the unified resource locator you can try this:
url(r'^', include('rest_framework.urls', namespace='rest_framework')),
So that upon redirection the url will be like in the below sample:
http://localhost:8000/login/
http://127.0.0.1:8000/login/
- [Answered ]-I am attempting to add two models from separate local apps into one template
- [Answered ]-MultiValueDictKeyError: "'password'"
- [Answered ]-Serve a file for download with Django
- [Answered ]-Why is stylesheet only working for the index page, but not for any extensions of the index page? (templates using Jinja)
- [Answered ]-Templates Doesnot exist at /accounts/login
Source:stackexchange.com