python - 白页为什么单击新创建的按钮
问题描述
我创建了一个按钮,它应该在新页面上进行重定向。但是当我点击它时,我得到一个没有任何信息的白页。
这是urls.py
文件的。
url(r'^layer_quarantine/', TemplateView.as_view(template_name='layer_quarantine.html'), name='layer_quarantine'),
这是名为的文件_layer_quarantine.html
{% extends "layers/layer_base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load url from future %}
{% load base_tags %}
{% block title %} {% trans "Explore Layers" %} - {{ block.super }} {% endblock %}
{% block body_class %}layers explore{% endblock %}
{% block body %}
<div class="page-header">
{% user_can_add_resource_base as add_tag %}
{% if add_tag %}
<a href="{% url "layer_upload" %}" class="btn btn-primary pull-right">{% trans "Upload Layers" %}</a>
<a style="margin-right:30px" href="{% url "layer_browse" %}" class="btn btn-success pull-right">
{% if LANGUAGE_CODE == "fr" %} Toutes les couches {% else %} All layers {% endif %}</a>
{% endif %}
<h2 class="page-title">
{% if LANGUAGE_CODE == "fr" %} Couches en attente de validation
{% else %} Layers awaiting validation {% endif %}
</h2>
</div>
{% with include_type_filter='true' %}
{% with facet_type='layers' %}
{% with header='Type' %}
{% with filter='type__in' %}
{% include "search/_search_content.html" %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
{% with is_layer='true' %}
{% include "_bulk_permissions_form.html" %}
{% endwith %}
{% endblock %}
{% block extra_script %}
{% if GEONODE_SECURITY_ENABLED %}
{% include "_permissions_form_js.html" %}
{% endif %}
<script type="text/javascript">
{% if HAYSTACK_SEARCH %}
SEARCH_URL = '{% url 'api_get_search' api_name='api' resource_name='base' %}?type__in=layer'
{% else %}
SEARCH_URL = '{% url 'api_dispatch_list' api_name='api' resource_name='layer_quarantine' %}';
{% endif %}
FILTER_TYPE = 'layer';
</script>
{% with include_spatial='true' %}
{% include 'search/search_scripts.html' %}
{% endwith %}
{% endblock extra_script %}
我也有layer_quarantine.html
文件
{% extends "geonode_base.html" %}
{% load il8n %}
{% %block title %} {% trans "Documents in standby" %} {% endblock %}
{% block body_outer %}
{% include 'documents/_document_quarantine.html' %}
{% endblock %}
这就是我制作按钮的方式
<a style="margin-right:30px" href="{% url "layer_quarantine" %}" class="btn btn-warning pull-right">
如果有人可以帮助我解决这个问题,那就太好了,因为我已经有一段时间了,我不知道如何解决这个问题。我不习惯做网络开发,所以请客气。
解决方案
推荐阅读
- javascript - 如何在 reactjs 中滚动时更改聊天中的消息状态?在滚动时触发太多事件
- java - 如何使用改造将不记名令牌添加到表单数据以 POST 到 Web API
- azure-devops - 是否可以在 Azure DevOps 中使用控制规则根据相关工作项链接类型设置布尔字段值?
- javascript - 当 vimeo 视频在同一页面中播放时停止响应式语音(反之亦然)
- regex - 正则表达式删除电子邮件中域后的特殊字符
- javascript - Dm 一个用户,如果另一个用户 ping 他们
- javascript - 如何获得在 VS 代码中显示 mu 代码的窗口?
- swift - Swift 包:在库之间共享内部代码,但在库用户之间不共享
- api - 如何指示可组合 API 中不需要强制参数?
- javascript - 突出显示同一页面上不同 html 表格中所有出现的文本