Browse Source

post

master
jfinn 1 month ago
parent
commit
a7e567ac57
2 changed files with 6 additions and 0 deletions
  1. 1
    0
      djc_srv/urls.py
  2. 5
    0
      wsps/views.py

+ 1
- 0
djc_srv/urls.py View File

@@ -26,6 +26,7 @@ urlpatterns = [
26 26
     path('jstp_dev1/', wsps.views.fn_v1),
27 27
     path('jstp_dev2/', wsps.views.fn_v2),
28 28
     path('jstp_dev3', wsps.views.CreatePostView.as_view()),
29
+    path('jstp_dev4', wsps.views.HomePageView.as_view()),
29 30
 
30 31
     # path("post/", CreatePostView.as_view(), name="add_post")  # new
31 32
 

+ 5
- 0
wsps/views.py View File

@@ -59,6 +59,11 @@ def fn_v0(request,*a,**kw):
59 59
 
60 60
 
61 61
 
62
+class HomePageView(ListView):
63
+    model = Post
64
+    template_name = "home.html"
65
+
66
+
62 67
 class CreatePostView(CreateView):  # new
63 68
 	model = Post
64 69
 	form_class = PostForm

Loading…
Cancel
Save