屏幕快照 2020-01-22 下午3.15.43.png
不要自己写代码丫,把电子版的直接粘过来就行
欲哭无泪
妈耶
注意注意
#这里不一样哦!!!!
# return HttpResponseRedirect(reverse('users:topic', args=[topic.id]))
return HttpResponseRedirect(reverse('users:topic', kwargs=dict(topic_id=topic.id)))
2.用户,变化最大
app_name='myself'
from django.urls import path,re_path
from . import views
from django.contrib.auth.views import LoginView
from django.urls import path
from . import views
urlpatterns = [
path('login/', LoginView.as_view(template_name='myself/login.html'), name="login"),
]
网友评论