pramod one of my friend was talking about that
I guess you're talking about me.
Yeah, that's quite easy. Follow my lead…
How to make a title from URL in Django?
Here's how you can do that.
- Create a Django app with
django-admin startapp additionals
- Make a cool sounding python file
context_processors.py inside the
additionals/ app directory
- Now, write these code in the
title = str(request.path).split('/')[-2].title().replace('-', " ")
Now go to settings.py add this
Your code will look similar to this…
# Here is the page_title context processor