Răsfoiți Sursa

# feat:初始化productsApp

yht 3 săptămâni în urmă
părinte
comite
713a8289cb

+ 0 - 0
pythonweb/productsApp/__init__.py


+ 3 - 0
pythonweb/productsApp/admin.py

@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.

+ 5 - 0
pythonweb/productsApp/apps.py

@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class ProductsappConfig(AppConfig):
+    name = 'productsApp'

+ 0 - 0
pythonweb/productsApp/migrations/__init__.py


+ 3 - 0
pythonweb/productsApp/models.py

@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.

+ 3 - 0
pythonweb/productsApp/tests.py

@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.

+ 10 - 0
pythonweb/productsApp/urls.py

@@ -0,0 +1,10 @@
+from django.urls import path
+from . import views
+
+app_name = 'productsApp'
+
+urlpatterns = [
+    path('robot/', views.robot, name='robot'),                   # 家用机器人
+    path('monitoring/', views.monitoring, name='monitoring'),    # 智能监控
+    path('face/', views.face, name='face'),                      # 人脸识别解决方案
+]

+ 18 - 0
pythonweb/productsApp/views.py

@@ -0,0 +1,18 @@
+from django.shortcuts import render
+from django.shortcuts import HttpResponse
+
+
+# Create your views here.
+def robot(request):
+    html = '<html><body>家用机器人</body></html>'
+    return HttpResponse(html)
+
+
+def monitoring(request):
+    html = '<html><body>智能监控</body></html>'
+    return HttpResponse(html)
+
+
+def face(request):
+    html = '<html><body>人脸识别解决方案</body></html>'
+    return HttpResponse(html)