我试图在索引中链接什么.html
<link rel="stylesheet" href="{% static 'assets/css/main.css' %}"/>
我也做过{%负载静态%}
我的文件结构是这样的:
signup/static/assets/css/main.css
settings.py
STATIC_URL = 'signup/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
错误:
[29/Feb/2020 17:19:31] "POST /postsign/ HTTP/1.1" 200 3445
Not Found: /postsign/signup/static/assets/css/main.css
我不明白那个/postign/是从哪里来的
我的 urls.py 是这样的:
urlpatterns = [
path('admin/', admin.site.urls),
path('', views.signIn),
path('postsign/', views.postsign),
path('logout/', views.logout, name="log"),
path('signup/', views.signUp, name="signup"),
path('postsignup/', views.postsignup, name="postsignup"),
path('profile/', views.profile, name="prof"),
]
后签名方法是:
def postsign(request):
email = request.POST.get('Email')
passw = request.POST.get("Password")
try:
user = authe.sign_in_with_email_and_password(email, passw)
except:
message = "Invalid Username or Password"
return render(request, "signin.html", {"messg": message})
print(user['idToken'])
session_id = user['idToken']
request.session['uid'] = str(session_id)
return render(request, "index.html")
Django 版本 3.0.3 如果有帮助
Qyouu
米脂
相关分类