[Fixed]-Django Slug URL Not Showing Page

1👍

When you visit my-event/annoucement-title url this will match share class details url pattern first and will never reach the announcement url pattern. To solve this you can do like:

 url(r'^class-detail/(?P<event_slug>[\w-]+)/(?P<share_class_slug>[\w-]+)/$', views.share_class_details, name='share class details'),

 url(r'^event-announcement/(?P<event_slug>[\w-]+)/(?P<announcement_slug>[\w-]+)/$', views.announcement, name='announcement'), 

Now if you visit event-announcement/my-event/annoucement-title it will match the announcement url pattern.

Leave a comment