add content block and breadcrumbs_empty block to base.html for reuse #4993
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change allows using the rest_framework/base.html as-is for all pages on a website and should have no impact on existing code.
Use case
I typically start new projects with cookiecutter-django.
It includes many pages for registration, login, change password, etc. All of their templates use a "content" block. In order to make all of those pages immediately compatible with DRF and styled the same, simply add these two files to a new project:
templates/base.html
templates/rest_framework/api.html
Breadcrumbs
Also, the "breadcrumbs" div is kept outside the content block with a default blank space because its top margin of 70px is needed for the fixed header and also maintains the look and feel. Maybe that should instead be put inside the content block so it can be controlled by the application and a more generic solution could be found for the 70px margin?