November 2015
Beginner to intermediate
840 pages
26h 30m
English
Post ObjectsMuch like blog_post_update, our blog_post_delete will replicate the path segment used to identify Post objects found in blog_post_detail. However, to differentiate blog_post_delete from either blog_post_detail or blog_post_detail, our new URL pattern will append the /delete/ path segment to our regular expression pattern, as shown in Example 9.68.
Example 9.68: Project Code
19 url(r'^(?P<year>\d{4})/' 20 r'(?P<month>\d{1,2})/' 21 r'(?P<slug>[\w\-]+)/' 22 r'delete/$', 23 PostDelete.as_view(), 24 name='blog_post_delete'),
Much like with the update URLs, it is in our interest to build a method ...
Read now
Unlock full access