Bläddra i källkod

#fix:staticfile2static

yht 1 dag sedan
förälder
incheckning
c375bc5206

BIN
pythonweb/db.sqlite3


+ 17 - 0
pythonweb/serviceApp/migrations/0002_alter_doc_options.py

@@ -0,0 +1,17 @@
+# Generated by Django 4.2.30 on 2026-05-09 14:10
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('serviceApp', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name='doc',
+            options={'ordering': ['-publishDate'], 'verbose_name': '资料', 'verbose_name_plural': '资料'},
+        ),
+    ]

+ 8 - 25
pythonweb/serviceApp/templates/docList.html

@@ -1,11 +1,4 @@
-{% extends "base.html" %}
-{% load staticfiles %}
-
-{% block title %}
-资料下载
-{% endblock %}
-
-{% block content %}
+{% extends "base.html" %} {% load static %} {% block title %} 资料下载 {% endblock %} {% block content %}
 <link href="{% static 'css/news.css' %}" rel="stylesheet">
 <!-- 广告横幅 -->
 <div class="container-fluid">
@@ -44,33 +37,23 @@
                     <a href="{% url 'serviceApp:getDoc' doc.id %}"><b>{{doc.title}}</b></a>
                     <span>【{{doc.publishDate|date:"Y-m-d"}}】</span>
                 </div>
-                {% endfor %}
-
-                {% if pageData %}
+                {% endfor %} {% if pageData %}
                 <div class="paging">
                     <ul id="pages" class="pagination">
                         {% if pageData.first %}
                         <li><a href="?page=1">1</a></li>
-                        {% endif %}
-                        {% if pageData.left %}
-                        {% if pageData.left_has_more %}
+                        {% endif %} {% if pageData.left %} {% if pageData.left_has_more %}
                         <li><span>...</span></li>
-                        {% endif %}
-                        {% for i in pageData.left %}
+                        {% endif %} {% for i in pageData.left %}
                         <li><a href="?page={{i}}">{{i}}</a></li>
-                        {% endfor %}
-                        {% endif %}
+                        {% endfor %} {% endif %}
                         <li class="active"><a href="?page={{pageData.page}}">
                                 {{pageData.page}}</a></li>
-                        {% if pageData.right %}
-                        {% for i in pageData.right %}
+                        {% if pageData.right %} {% for i in pageData.right %}
                         <li><a href="?page={{i}}">{{i}}</a></li>
-                        {% endfor %}
-                        {% if pageData.right_has_more %}
+                        {% endfor %} {% if pageData.right_has_more %}
                         <li><span>...</span></li>
-                        {% endif %}
-                        {% endif %}
-                        {% if pageData.last %}
+                        {% endif %} {% endif %} {% if pageData.last %}
                         <li><a href="?page={{pageData.total_pages}}">
                                 {{pageData.total_pages}}</a></li>
                         {% endif %}

+ 12 - 20
pythonweb/serviceApp/templates/platForm.html

@@ -1,11 +1,4 @@
-{% extends "base.html" %}
-{% load staticfiles %}
-
-{% block title %}
-人脸识别开放平台
-{% endblock %}
-
-{% block content %}
+{% extends "base.html" %} {% load static %} {% block title %} 人脸识别开放平台 {% endblock %} {% block content %}
 <link href="{% static 'css/news.css' %}" rel="stylesheet">
 <link rel="stylesheet" href="{% static 'css/codemirror.css' %}">
 <script src="{% static 'js/codemirror.js' %}"></script>
@@ -54,8 +47,7 @@
                     人脸检测
                 </button>
                 <!-- 模态框(Modal) -->
-                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
-                    aria-hidden="true">
+                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                     <div class="modal-dialog">
                         <div class="modal-content">
                             <div class="modal-header">
@@ -67,8 +59,7 @@
                                 </h4>
                             </div>
                             <div class="modal-body">
-                                <img id="photoIn" src="{% static 'img/sample.png' %}" class="img-responsive"
-                                    style="max-width:250px">
+                                <img id="photoIn" src="{% static 'img/sample.png' %}" class="img-responsive" style="max-width:250px">
                                 <input type="file" id="photo" name="photo" />
                             </div>
                             <div class="modal-footer">
@@ -78,23 +69,25 @@
                                     开始检测
                                 </button>
                             </div>
-                        </div><!-- /.modal-content -->
-                    </div><!-- /.modal -->
+                        </div>
+                        <!-- /.modal-content -->
+                    </div>
+                    <!-- /.modal -->
                 </div>
                 <script>
-                    $(function () {
-                        $('#photo').on('change', function () {
+                    $(function() {
+                        $('#photo').on('change', function() {
                             var r = new FileReader();
                             f = document.getElementById('photo').files[0];
                             r.readAsDataURL(f);
-                            r.onload = function (e) {
+                            r.onload = function(e) {
                                 document.getElementById('photoIn').src = this.result;
                             };
                         });
                     });
                 </script>
                 <script>
-                    $('#compute').click(function () {
+                    $('#compute').click(function() {
                         formdata = new FormData();
                         var file = $("#photo")[0].files[0];
                         formdata.append("image", file);
@@ -127,8 +120,7 @@
                 </br>
                 <h4><strong>接口描述:</strong></h4>
                 <p>
-                    人脸检测,此接口多用于调用人脸识别、人脸比对的接口之前,用于从图像数据中检测出人脸区域,并以
-                    矩形框形式返回人脸检测结果。目前该接口仅供测试使用,调用该接口暂时不限制调用次数。
+                    人脸检测,此接口多用于调用人脸识别、人脸比对的接口之前,用于从图像数据中检测出人脸区域,并以 矩形框形式返回人脸检测结果。目前该接口仅供测试使用,调用该接口暂时不限制调用次数。
                 </p>
 
                 </br>