commit 330eac342fc09092ffd6a6b91de53e15ce3ec3ca Author: Franklin-F Date: Sat Apr 12 16:49:12 2025 +0800 首次提交 diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/TS-ResHub.iml b/.idea/TS-ResHub.iml new file mode 100644 index 0000000..bf29436 --- /dev/null +++ b/.idea/TS-ResHub.iml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..18c2173 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,85 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..eb7104e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..ecdddea --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/access_control/__init__.py b/access_control/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/access_control/admin.py b/access_control/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/access_control/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/access_control/apps.py b/access_control/apps.py new file mode 100644 index 0000000..b724f11 --- /dev/null +++ b/access_control/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AccessControlConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'access_control' diff --git a/access_control/migrations/__init__.py b/access_control/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/access_control/models.py b/access_control/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/access_control/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/access_control/tests.py b/access_control/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/access_control/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/access_control/views.py b/access_control/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/access_control/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/accounts/__init__.py b/accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accounts/admin.py b/accounts/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/accounts/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/accounts/apps.py b/accounts/apps.py new file mode 100644 index 0000000..3e3c765 --- /dev/null +++ b/accounts/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AccountsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'accounts' diff --git a/accounts/migrations/__init__.py b/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/accounts/models.py b/accounts/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/accounts/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/accounts/tests.py b/accounts/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/accounts/views.py b/accounts/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/accounts/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/admin_panel/__init__.py b/admin_panel/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/admin_panel/admin.py b/admin_panel/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/admin_panel/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/admin_panel/apps.py b/admin_panel/apps.py new file mode 100644 index 0000000..c025e01 --- /dev/null +++ b/admin_panel/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AdminPanelConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'admin_panel' diff --git a/admin_panel/migrations/__init__.py b/admin_panel/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/admin_panel/models.py b/admin_panel/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/admin_panel/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/admin_panel/tests.py b/admin_panel/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/admin_panel/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/admin_panel/views.py b/admin_panel/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/admin_panel/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/asgi.py b/core/asgi.py new file mode 100644 index 0000000..39b17f4 --- /dev/null +++ b/core/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for ts_reshub 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/5.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ts_reshub.settings') + +application = get_asgi_application() diff --git a/core/settings.py b/core/settings.py new file mode 100644 index 0000000..6949006 --- /dev/null +++ b/core/settings.py @@ -0,0 +1,123 @@ +""" +Django settings for ts_reshub project. + +Generated by 'django-admin startproject' using Django 5.0.14. + +For more information on this file, see +https://docs.djangoproject.com/en/5.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.0/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/5.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-)y%p7jo8qwn47uwp$zqf4!j+-3&g2)b220ekiac-))e$ar%622' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + '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 = 'ts_reshub.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 = 'ts_reshub.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.0/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/5.0/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/5.0/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/core/urls.py b/core/urls.py new file mode 100644 index 0000000..1471c0a --- /dev/null +++ b/core/urls.py @@ -0,0 +1,22 @@ +""" +URL configuration for ts_reshub project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/5.0/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/core/wsgi.py b/core/wsgi.py new file mode 100644 index 0000000..f1e2345 --- /dev/null +++ b/core/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for ts_reshub 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/5.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') + +application = get_wsgi_application() diff --git a/logs/__init__.py b/logs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/logs/admin.py b/logs/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/logs/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/logs/apps.py b/logs/apps.py new file mode 100644 index 0000000..b5fd3ee --- /dev/null +++ b/logs/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class LogsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'logs' diff --git a/logs/migrations/__init__.py b/logs/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/logs/models.py b/logs/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/logs/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/logs/tests.py b/logs/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/logs/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/logs/views.py b/logs/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/logs/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..f2a662c --- /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', 'core.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() diff --git a/resumes/__init__.py b/resumes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/resumes/admin.py b/resumes/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/resumes/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/resumes/apps.py b/resumes/apps.py new file mode 100644 index 0000000..c597c0d --- /dev/null +++ b/resumes/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ResumesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'resumes' diff --git a/resumes/migrations/__init__.py b/resumes/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/resumes/models.py b/resumes/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/resumes/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/resumes/tests.py b/resumes/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/resumes/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/resumes/views.py b/resumes/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/resumes/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/websites/__init__.py b/websites/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/websites/admin.py b/websites/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/websites/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/websites/apps.py b/websites/apps.py new file mode 100644 index 0000000..c61548e --- /dev/null +++ b/websites/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class WebsitesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'websites' diff --git a/websites/migrations/__init__.py b/websites/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/websites/models.py b/websites/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/websites/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/websites/tests.py b/websites/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/websites/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/websites/views.py b/websites/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/websites/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.