While experimenting with extending DRF, I found that the login page 1) had no title, and 2) duplicated <head> info from base.html. This change adds a new {% block body %} to the base.html template which allows override of the entire html <body>. login_base.html has its duplicated head info stripped, and now extends base.html to share common html <head> templating. As part of this change, pretify.css is unnecessarily added to login_base.html. If this is deemed a problem, it will be easy to block that css out, and have login_base.html override the block. Ideally, I would have liked to create a new api_base.html that extends base.html, move the api specific logic into that template, and leave base.html content agnostic, to truely be a unifying base for all DRF pages. But this change would break current apps that override api.html and expect base.html to be the immediate super template. :/ This change is benificial because it: - removes duplication of header declarations (mostly css includes) - adds a html title to the login page - standardizes html header info across all DRF pages Docs are updated to reflect the new structure.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
authtoken | Loading commit data... | |
runtests | Loading commit data... | |
static/rest_framework | Loading commit data... | |
templates/rest_framework | Loading commit data... | |
templatetags | Loading commit data... | |
tests | Loading commit data... | |
utils | Loading commit data... | |
__init__.py | Loading commit data... | |
authentication.py | Loading commit data... | |
compat.py | Loading commit data... | |
decorators.py | Loading commit data... | |
exceptions.py | Loading commit data... | |
fields.py | Loading commit data... | |
filters.py | Loading commit data... | |
generics.py | Loading commit data... | |
mixins.py | Loading commit data... | |
models.py | Loading commit data... | |
negotiation.py | Loading commit data... | |
pagination.py | Loading commit data... | |
parsers.py | Loading commit data... | |
permissions.py | Loading commit data... | |
relations.py | Loading commit data... | |
renderers.py | Loading commit data... | |
request.py | Loading commit data... | |
response.py | Loading commit data... | |
reverse.py | Loading commit data... | |
routers.py | Loading commit data... | |
serializers.py | Loading commit data... | |
settings.py | Loading commit data... | |
six.py | Loading commit data... | |
status.py | Loading commit data... | |
test.py | Loading commit data... | |
throttling.py | Loading commit data... | |
urlpatterns.py | Loading commit data... | |
urls.py | Loading commit data... | |
views.py | Loading commit data... | |
viewsets.py | Loading commit data... |