Django

20 views
Skip to first unread message

mick

unread,
Jan 30, 2020, 8:38:43 AM1/30/20
to Django users
How to make custom url in the Django,I want to extract title from the HTML template and then get it displayed in url

Desmond Nyamador

unread,
Jan 30, 2020, 9:49:01 AM1/30/20
to Django users
Hi Mick, I suggest you create a slug field in your model which will be used to filter your model rather than an id.If an object get saved with a title of foo bar, the slug field would handle the slugification of that title to "foo-bar"
Reply all
Reply to author
Forward
0 new messages