From 66892199f13941e7a5cc782cab72b6ebaf6a22aa Mon Sep 17 00:00:00 2001 From: xqz_admin Date: Thu, 19 Jun 2025 10:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Echo_Z/__init__.py | 0 Echo_Z/__pycache__/__init__.cpython-39.pyc | Bin 0 -> 152 bytes Echo_Z/__pycache__/settings.cpython-39.pyc | Bin 0 -> 2286 bytes Echo_Z/__pycache__/urls.cpython-39.pyc | Bin 0 -> 942 bytes Echo_Z/__pycache__/wsgi.cpython-39.pyc | Bin 0 -> 553 bytes Echo_Z/asgi.py | 16 +++ Echo_Z/settings.py | 124 +++++++++++++++++++++ Echo_Z/urls.py | 22 ++++ Echo_Z/wsgi.py | 16 +++ README.md | 34 ++++++ db.sqlite3 | 0 home/__init__.py | 0 home/admin.py | 3 + home/apps.py | 6 + home/migrations/__init__.py | 0 home/models.py | 3 + home/tests.py | 3 + home/views.py | 3 + manage.py | 22 ++++ 19 files changed, 252 insertions(+) create mode 100644 Echo_Z/__init__.py create mode 100644 Echo_Z/__pycache__/__init__.cpython-39.pyc create mode 100644 Echo_Z/__pycache__/settings.cpython-39.pyc create mode 100644 Echo_Z/__pycache__/urls.cpython-39.pyc create mode 100644 Echo_Z/__pycache__/wsgi.cpython-39.pyc create mode 100644 Echo_Z/asgi.py create mode 100644 Echo_Z/settings.py create mode 100644 Echo_Z/urls.py create mode 100644 Echo_Z/wsgi.py create mode 100644 README.md create mode 100644 db.sqlite3 create mode 100644 home/__init__.py create mode 100644 home/admin.py create mode 100644 home/apps.py create mode 100644 home/migrations/__init__.py create mode 100644 home/models.py create mode 100644 home/tests.py create mode 100644 home/views.py create mode 100755 manage.py diff --git a/Echo_Z/__init__.py b/Echo_Z/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Echo_Z/__pycache__/__init__.cpython-39.pyc b/Echo_Z/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b66f4b8a95144b54d2bc4c4ab355be09bd44a63d GIT binary patch literal 152 zcmYe~<>g`kf}O>|86f&Gh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o6vOKeRZts8~NL zqckzE%1A#sKP6Sapt2+*KTp3nGq)fowKP-TH8~?cJ_<&~$7kkcmc+;F6;$5hu*uC& ODa}c>0~z}nh#3HB;UnGv literal 0 HcmV?d00001 diff --git a/Echo_Z/__pycache__/settings.cpython-39.pyc b/Echo_Z/__pycache__/settings.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7b7982207a3c7499649495d6383cdc2f00aa215c GIT binary patch literal 2286 zcmb7FTXWM!6qX(Nf{7s{KqyRS!~+8^L>giWZKtIuwvu?TEl(tqRxcV^yRp~khIW-; zz4mYL(DJ}c|B_z&)IY#Or&D?)+lj|vrm1D^?VR(Sv)`VxvZ~bz2fvS08+};ixIfa# z;;#sk7x2;#&>+s>P!8ptoSQfDIS%LX$}hQJ`QNy4VO%hZXvHWY-Y5?_7SG!|9%5hw!Ikvo^FHp=F@rG15 z@`8zqF+U(S zmF59UQ+PJQ!cpWnf?KeNeBB$>24M$urM$x1Kug__#i)ZIA8+FT98L$ay@d z>$Q?mro;^#9Fh3?6i~E%kA-9)X8gt*%c~LizO%HLnqZHyNq}j*xg?~RQXu@izy*Od z1dH3t77UKaP7j9GO7YfA>Jo$;d}4)I%yvxJMAXu)!=Q62i=Qlm&D@I%_S$r9!K!xN z37om>dtxK&{zH|9M`8n-R|KCds6JbY#RBpcWbY}nKMeV0W(woJ22Jqsd z0Nu#NA+gUR6tK4y(PX8sH{udp_E0QR{N)T5m~?%F9V+gSArzCpOR$5wwauhtnsAMq zW>N~^vUJEG%mcMa*)-E@C0!3O^_^p!6a%+|Eg`dyVsZZ z6tkf=6##5?6w^>4Wy*aBxb^s(ZcKj2pX+tJscg2k1zwI1NYO zD%rB)3bTRlG?6MKB(N06c7EP}@BMFbb{2UszMHG^F7Uh`ZgV_Fuz3lOc?1*nGLQN+ zsC*G*f$!F%Y9zue^gR~RkOjN(Zt^wQ`q>E`UwO%dd;!qt`u$r}D7oR=Mia}GL>r~i zc~Po7L$y{rR@gL(K9mgIG`gyZwMDy*7*kc4ljfJu$(~d~mF&^l=0j&RFjeqZoz~upOfYaJot0j8H0cdl*h%gd4e{*m8*kYhjOIO@PT9>yXZ{$XSVA~Z7~=) zWQyHEhZ`qJ^b`8lOZ;|BsNfP7p>zCp(rxj(WZItOIrK-KXZL$bpu}pv*3i0MdwRrE zyW7x)hFjK#j(B@|RLpOlz6amC>Fz1MHcT6wl?{=%OI#?*aJ{#slGs4sRIK6na07;y c15E3EJAEb;Z7TM{2Q)KEAlbpQYW literal 0 HcmV?d00001 diff --git a/Echo_Z/__pycache__/wsgi.cpython-39.pyc b/Echo_Z/__pycache__/wsgi.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1d86691988d39b57f5323a5bf594853b9434a43a GIT binary patch literal 553 zcmYjP!H&}~5Ovb-wgeV9AkMy4f*7s1fDi&{OH~BjLw1Ffi)-R(;>z(@vD>A+BK`x8 zd;&khAy-cP0w$;BaBRa6ya~%a3m{2OWF%u9 zT@Plc;@Eg6G{HKa$ZtzIgw3F}vj1^y+H9m}UIq<;C@f>Ha}~ z`P6~;%9L(0YDb(01)R4ry7pnOBQ1jbwCmc$fu|jT*{TLjn}mZBR$`-ld-sU&CuzE8 zJixyf?Ak%&SYB;}*`KolB`~}56&mJLZ8dBZ>xJC9jw-dgcKoUz_3Q8zh#LnO-WkXD H;`{M`R`08R literal 0 HcmV?d00001 diff --git a/Echo_Z/asgi.py b/Echo_Z/asgi.py new file mode 100644 index 0000000..49849bb --- /dev/null +++ b/Echo_Z/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for Echo_Z project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Echo_Z.settings') + +application = get_asgi_application() diff --git a/Echo_Z/settings.py b/Echo_Z/settings.py new file mode 100644 index 0000000..84c6ac7 --- /dev/null +++ b/Echo_Z/settings.py @@ -0,0 +1,124 @@ +""" +Django settings for Echo_Z project. + +Generated by 'django-admin startproject' using Django 4.2.23. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.2/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-5ml96xc3pyvoo!(3)jibktzi7nnm-6lmjv3y)2h%p@n+chl1b3' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'simpleui', + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'Echo_Z.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'Echo_Z.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/4.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/4.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/4.2/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/Echo_Z/urls.py b/Echo_Z/urls.py new file mode 100644 index 0000000..d4b8cb8 --- /dev/null +++ b/Echo_Z/urls.py @@ -0,0 +1,22 @@ +""" +URL configuration for Echo_Z project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/4.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path + +urlpatterns = [ + path('admin/', admin.site.urls), +] diff --git a/Echo_Z/wsgi.py b/Echo_Z/wsgi.py new file mode 100644 index 0000000..c9f6742 --- /dev/null +++ b/Echo_Z/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for Echo_Z project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Echo_Z.settings') + +application = get_wsgi_application() diff --git a/README.md b/README.md new file mode 100644 index 0000000..9e522da --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# 项目介绍 + 本项目是基于Django框架进行开发,使用simpleui进行管理界面的开发 +# 环境依赖 + Django、simpleui、python3 + +# 目录结构描述 + ├── ReadMe.md // 帮助文档 + + ├── home // 首页app + + ├── api // 项目api + + └── Echo-Z // 项目配置等目录 + +# 使用说明 +运行命令安装依赖 +```shell +pip install -r requirements.txt +```` +运行命令运行项目 +```shell +python manage.py runserver +``` +指定端口运行项目(这里的9999是自己指定的端口) +```shell +python manage.py runserver 9999 +``` + + +# 版本内容更新 +###### 1.1.1 + 2025年6月19 + 项目建立 + diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100644 index 0000000..e69de29 diff --git a/home/__init__.py b/home/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/home/admin.py b/home/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/home/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/home/apps.py b/home/apps.py new file mode 100644 index 0000000..e5ea0af --- /dev/null +++ b/home/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class HomeConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'home' diff --git a/home/migrations/__init__.py b/home/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/home/models.py b/home/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/home/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/home/tests.py b/home/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/home/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/home/views.py b/home/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/home/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..d66fa93 --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Echo_Z.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main()