advice needed!

My setup is: I have 5 Django apps, each has 3–7 models. For each model, there is a list and a create/edit view. All are based on the same base.html.

I want to have <title> be set in a LIFO manner. For example, list of ‘items’ inside ‘warehouse’ app would have the title ‘Items - Warehouse - Site name’.

Right now I have to create almost identical base templates with just the title block for every app. Is there a less repetitive way?

cc: @ru @pbx

@kytta @ru Are these generic views? If not, I'd think you could generate an appropriate title in each of the views, putting it in the template context, and reference it in the template. This may be off-base but it's the first thing that comes to mind.

@kytta I’ve actually been using blocks as well at the moment. I haven’t cared to optimise this as I haven’t felt the need.


Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.