初步框架搭建

This commit is contained in:
2024-09-03 20:57:22 +08:00
parent 808b211882
commit d32e0000ba
947 changed files with 159376 additions and 0 deletions
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.
+6
View File
@@ -0,0 +1,6 @@
from django.apps import AppConfig
class JumpConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "jump"
+3
View File
@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.
+3
View File
@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.
+9
View File
@@ -0,0 +1,9 @@
from django.urls import path, include,re_path
from jump.views import to_index,to_register,to_login
urlpatterns = [
path('', to_index, name="index_jump"), # 跳转首页界面
path('login', to_login, name="login_jump"), # 跳转到登录页面
path('register',to_register, name = "register_jump"), # 跳转到注册页面
]
+26
View File
@@ -0,0 +1,26 @@
from django.shortcuts import render
import json
# Create your views here
def to_index(request):
"""
主界面
"""
site_title_first = "在星河中"
site_title = "在星河中"
site_one = "心之何如,有似万丈迷津,遥亘千里,其中并无舟子可渡人,除了自渡,他人爱莫能助。"
data = {"site_title_first":site_title_first,"site_title":site_title,"site_one":site_one}
return render(request, "html/index.html",data)
def to_login(request):
"""
登录界面
"""
return render(request,"html/login.html")
def to_register(request):
"""
注册页面
"""
return render(request,"html/register.html")