Add url pattern for adding new forum page

parent d268a0a0
...@@ -2,12 +2,13 @@ from django.urls import path ...@@ -2,12 +2,13 @@ from django.urls import path
from django.conf.urls.static import static from django.conf.urls.static import static
from django.conf import settings from django.conf import settings
from . import views from . import views
#import PostCreate
from .views import IndexView
app_name = "forum" app_name = 'forum'
urlpatterns = [ urlpatterns = [
path('', views.index, name='index'), path('', IndexView.as_view(), name='index'),
path('<int:post_id>/details/', views.details, name='details'),
# forum/post_id #add this
path("posts/<int:post_id>/details", views.details, name="details"), path("add/", views.add, name = 'add')
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment