mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Remove a bit of inline CSS. Add CSP nonce where it might be required and is available.
This commit is contained in:
parent
a0083f7f98
commit
316cabfb24
|
@ -231,3 +231,7 @@ body a:hover {
|
|||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin: 5px 0 10px 0;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/prettify.css" %}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/default.css" %}"/>
|
||||
{% if code_style %}<style>{{ code_style }}</style>{% endif %}
|
||||
{% if code_style %}
|
||||
<style{% if request.csp_nonce %} nonce="{{request.csp_nonce}}"{% endif %}>{{ code_style }}</style>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -158,19 +160,19 @@
|
|||
<div class="page-header">
|
||||
<h1>{{ name }}</h1>
|
||||
</div>
|
||||
<div style="float:left">
|
||||
<div class="pull-left">
|
||||
{% block description %}
|
||||
{{ description }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% if paginator %}
|
||||
<nav style="float: right">
|
||||
<nav class="pull-right">
|
||||
{% get_pagination_html paginator %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<div class="request-info" style="clear: both" aria-label="{% trans "request info" %}">
|
||||
<div class="request-info" aria-label="{% trans "request info" %}">
|
||||
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<ul class="pagination" style="margin: 5px 0 10px 0">
|
||||
<ul class="pagination">
|
||||
{% if previous_url %}
|
||||
<li>
|
||||
<a href="{{ previous_url }}" aria-label="Previous">
|
||||
|
|
Loading…
Reference in New Issue
Block a user