首次提交

This commit is contained in:
晓丰 2025-04-12 16:49:12 +08:00
commit 330eac342f
55 changed files with 451 additions and 0 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

24
.idea/TS-ResHub.iml generated Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="settings.py" />
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
<option name="environment" value="&lt;map/&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>

View File

@ -0,0 +1,85 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="72">
<item index="0" class="java.lang.String" itemvalue="Automat" />
<item index="1" class="java.lang.String" itemvalue="Babel" />
<item index="2" class="java.lang.String" itemvalue="PyYAML" />
<item index="3" class="java.lang.String" itemvalue="ufw" />
<item index="4" class="java.lang.String" itemvalue="python-linux-procfs" />
<item index="5" class="java.lang.String" itemvalue="constantly" />
<item index="6" class="java.lang.String" itemvalue="PyGObject" />
<item index="7" class="java.lang.String" itemvalue="distro-info" />
<item index="8" class="java.lang.String" itemvalue="pyasn1-modules" />
<item index="9" class="java.lang.String" itemvalue="python-magic" />
<item index="10" class="java.lang.String" itemvalue="systemd-python" />
<item index="11" class="java.lang.String" itemvalue="sos" />
<item index="12" class="java.lang.String" itemvalue="certifi" />
<item index="13" class="java.lang.String" itemvalue="oauthlib" />
<item index="14" class="java.lang.String" itemvalue="gevent" />
<item index="15" class="java.lang.String" itemvalue="pyparsing" />
<item index="16" class="java.lang.String" itemvalue="unattended-upgrades" />
<item index="17" class="java.lang.String" itemvalue="jsonschema" />
<item index="18" class="java.lang.String" itemvalue="hyperlink" />
<item index="19" class="java.lang.String" itemvalue="service-identity" />
<item index="20" class="java.lang.String" itemvalue="lazr.restfulclient" />
<item index="21" class="java.lang.String" itemvalue="cryptography" />
<item index="22" class="java.lang.String" itemvalue="zope.interface" />
<item index="23" class="java.lang.String" itemvalue="pexpect" />
<item index="24" class="java.lang.String" itemvalue="lazr.uri" />
<item index="25" class="java.lang.String" itemvalue="python-apt" />
<item index="26" class="java.lang.String" itemvalue="SecretStorage" />
<item index="27" class="java.lang.String" itemvalue="ubuntu-advantage-tools" />
<item index="28" class="java.lang.String" itemvalue="attrs" />
<item index="29" class="java.lang.String" itemvalue="bcrypt" />
<item index="30" class="java.lang.String" itemvalue="ssh-import-id" />
<item index="31" class="java.lang.String" itemvalue="jsonpatch" />
<item index="32" class="java.lang.String" itemvalue="idna" />
<item index="33" class="java.lang.String" itemvalue="distro" />
<item index="34" class="java.lang.String" itemvalue="PyJWT" />
<item index="35" class="java.lang.String" itemvalue="decorator" />
<item index="36" class="java.lang.String" itemvalue="netifaces" />
<item index="37" class="java.lang.String" itemvalue="ptyprocess" />
<item index="38" class="java.lang.String" itemvalue="more-itertools" />
<item index="39" class="java.lang.String" itemvalue="httplib2" />
<item index="40" class="java.lang.String" itemvalue="pyasn1" />
<item index="41" class="java.lang.String" itemvalue="requests" />
<item index="42" class="java.lang.String" itemvalue="wadllib" />
<item index="43" class="java.lang.String" itemvalue="importlib-metadata" />
<item index="44" class="java.lang.String" itemvalue="jeepney" />
<item index="45" class="java.lang.String" itemvalue="python-debian" />
<item index="46" class="java.lang.String" itemvalue="pyrsistent" />
<item index="47" class="java.lang.String" itemvalue="pyOpenSSL" />
<item index="48" class="java.lang.String" itemvalue="launchpadlib" />
<item index="49" class="java.lang.String" itemvalue="zipp" />
<item index="50" class="java.lang.String" itemvalue="cloud-init" />
<item index="51" class="java.lang.String" itemvalue="urllib3" />
<item index="52" class="java.lang.String" itemvalue="itsdangerous" />
<item index="53" class="java.lang.String" itemvalue="zope.event" />
<item index="54" class="java.lang.String" itemvalue="ubuntu-drivers-common" />
<item index="55" class="java.lang.String" itemvalue="six" />
<item index="56" class="java.lang.String" itemvalue="xkit" />
<item index="57" class="java.lang.String" itemvalue="jsonpointer" />
<item index="58" class="java.lang.String" itemvalue="PyHamcrest" />
<item index="59" class="java.lang.String" itemvalue="pyserial" />
<item index="60" class="java.lang.String" itemvalue="incremental" />
<item index="61" class="java.lang.String" itemvalue="chardet" />
<item index="62" class="java.lang.String" itemvalue="colorama" />
<item index="63" class="java.lang.String" itemvalue="pyudev" />
<item index="64" class="java.lang.String" itemvalue="typing_extensions" />
<item index="65" class="java.lang.String" itemvalue="configobj" />
<item index="66" class="java.lang.String" itemvalue="dbus-python" />
<item index="67" class="java.lang.String" itemvalue="command-not-found" />
<item index="68" class="java.lang.String" itemvalue="pytz" />
<item index="69" class="java.lang.String" itemvalue="keyring" />
<item index="70" class="java.lang.String" itemvalue="Twisted" />
<item index="71" class="java.lang.String" itemvalue="vector_quantize_pytorch" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.9 (exta)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (exta)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/TS-ResHub.iml" filepath="$PROJECT_DIR$/.idea/TS-ResHub.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

3
access_control/admin.py Normal file
View File

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

6
access_control/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class AccessControlConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'access_control'

View File

3
access_control/models.py Normal file
View File

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

3
access_control/tests.py Normal file
View File

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

3
access_control/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

0
accounts/__init__.py Normal file
View File

3
accounts/admin.py Normal file
View File

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

6
accounts/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class AccountsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'accounts'

View File

3
accounts/models.py Normal file
View File

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

3
accounts/tests.py Normal file
View File

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

3
accounts/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

0
admin_panel/__init__.py Normal file
View File

3
admin_panel/admin.py Normal file
View File

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

6
admin_panel/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class AdminPanelConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'admin_panel'

View File

3
admin_panel/models.py Normal file
View File

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

3
admin_panel/tests.py Normal file
View File

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

3
admin_panel/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

0
core/__init__.py Normal file
View File

16
core/asgi.py Normal file
View File

@ -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()

123
core/settings.py Normal file
View File

@ -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'

22
core/urls.py Normal file
View File

@ -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),
]

16
core/wsgi.py Normal file
View File

@ -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()

0
logs/__init__.py Normal file
View File

3
logs/admin.py Normal file
View File

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

6
logs/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class LogsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'logs'

View File

3
logs/models.py Normal file
View File

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

3
logs/tests.py Normal file
View File

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

3
logs/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

22
manage.py Executable file
View File

@ -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()

0
resumes/__init__.py Normal file
View File

3
resumes/admin.py Normal file
View File

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

6
resumes/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class ResumesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'resumes'

View File

3
resumes/models.py Normal file
View File

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

3
resumes/tests.py Normal file
View File

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

3
resumes/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

0
websites/__init__.py Normal file
View File

3
websites/admin.py Normal file
View File

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

6
websites/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class WebsitesConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'websites'

View File

3
websites/models.py Normal file
View File

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

3
websites/tests.py Normal file
View File

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

3
websites/views.py Normal file
View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.