From 6393dd5a5e26362cf93c219271646bc31230f1cf Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sat, 9 Jul 2022 15:07:38 +0100 Subject: [PATCH] Add PostList view --- flangr/posts/urls.py | 1 + flangr/templates/posts/post_list.html | 9 +++++++++ flangr/urls.py | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 flangr/templates/posts/post_list.html diff --git a/flangr/posts/urls.py b/flangr/posts/urls.py index 7dc96a0..74a376a 100644 --- a/flangr/posts/urls.py +++ b/flangr/posts/urls.py @@ -6,4 +6,5 @@ app_name = "posts" urlpatterns = [ path("post/", views.PostDetailView.as_view(), name="post_detail"), path("post/new", views.PostCreateView.as_view(), name="post_create"), + path("posts", views.PostListView.as_view(), name="post_list"), ] diff --git a/flangr/templates/posts/post_list.html b/flangr/templates/posts/post_list.html new file mode 100644 index 0000000..a4e002b --- /dev/null +++ b/flangr/templates/posts/post_list.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block content %} +

Posts Shared with you

+ +{% endblock content %} diff --git a/flangr/urls.py b/flangr/urls.py index 19577ed..e836cd4 100644 --- a/flangr/urls.py +++ b/flangr/urls.py @@ -19,11 +19,14 @@ from django.contrib import admin from django.urls import include from django.urls import path +from .posts.views import PostListView + urlpatterns = [ path("admin/", admin.site.urls), path("accounts/", include("django.contrib.auth.urls")), path("posts/", include("flangr.posts.urls")), path("circles/", include("flangr.circles.urls")), + path("", PostListView.as_view(), name="home"), ] if settings.DEBUG: