django html跳转页面跳转页面,Django html单击打开另一个html页面
我目前在使用django打开html页面时遇到了问题,尽管我已经尝试在网址.py, 视图.py,以及html页面。我的代码如下:
电池电流.py在“视图”文件夹下from __future__ import absolute_import
from __future__ import unicode_literals
from django.core.files.storage import default_storage
from django.core.urlresolvers import reverse_lazy
from django.http import HttpResponseRedirect
from django.utils import timezone
from django.views.generic import FormView, TemplateView
from sendfile import sendfile
import os.path
from .mixin import AjaxTemplateMixin, PermissionRequiredMixin, PageTitleMixin
from ..forms import DiagnosticsForm
from ..tasks import dump_diagnostics
from django.shortcuts import render
class DiagnosticMixin(PageTitleMixin, PermissionRequiredMixin):
permission_required = ['system.view_log_files']
page_title = 'Diagnostics'
form_class = DiagnosticsForm
class BatteryCurrentView(DiagnosticMixin,FormView):
template_name = 'system/batterycurrent.html'
def batterycurrent(request):
return render(request, 'system/batterycurrent.html')
网址.py
^{pr2}$
**电池电流.html在里面诊断.html. 在
电池电流.html(模板(html在系统文件夹中)
Battery Current Vs Timestamp当我开始执行代码时,错误出现了i) importError batterycurrentView couldn't be imported
ii)Reverse for 'batterycurrent' with arguments '()' and keyword arguments '{}'
not found. 0 pattern(s) tried: []
请给我指点这个
总结
以上是生活随笔为你收集整理的django html跳转页面跳转页面,Django html单击打开另一个html页面的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 关山牧场在哪 关山牧场位置简述
- 下一篇: html鼠标悬停盒子凸起,css3 tr