samedi 28 décembre 2019

Django- using same html template for the same purpose but for different users- blog web

I'm working on a blog web app and I want to know if there is a way to make 1 html template called blog.html for example that its content is different for each user who made it? Like if I have 200 users who create a blog in my web app and I dont want to make for each of them a special template.. I mean I want every one to have his unique blog but using the same blog.html template and then I can direct to their own unique blog using different end to the path.. and i'll take that end from the model field of the user..

like I can iterate through user.name model field and set it as the end path.. like in the ListView.. and I want each end path will direct to the specific blog using the same html template but dynamicly.

Anyway thanks for helping and if there is some one who build web apps with Django and want to work together with me, ill glad to :)

Hope you understand my intention.




Aucun commentaire:

Enregistrer un commentaire