未验证 提交 7571cadb 编写于 作者: T TOBEALISTENER 提交者: GitHub

Add files via upload

上级 4616c80e
......@@ -55,7 +55,7 @@ ROOT_URLCONF = 'Poetry_AE.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [os.path.join(BASE_DIR,'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
......@@ -123,3 +123,6 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR,"static"),
]
\ No newline at end of file
......@@ -14,8 +14,11 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
from . import views
urlpatterns = [
path('', views.index),
path('sign_in/', views.Login, name='Login'),
path('sign_up/', views.Register, name='Register'),
path('admin/', admin.site.urls),
]
from django.shortcuts import render
def index(request):
return render(request, "index.html")
def Login(request):
return render(request, "sign_in.html")
def Register(request):
return render(request, "sign_up.html")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册