bmaeser
bmaeser

Reputation: 1010

django admin.site.name in template

Hallo,

is there any chance to access the "name" value of the current admin.site object in a admin template?

I have 3 different admin.site-objects and want a template tag to generate generic content,depending on the current admin.site.name.

thanks in advance

Upvotes: 0

Views: 1982

Answers (1)

Will McCutchen
Will McCutchen

Reputation: 13117

You could provide the name of the current site to all of your templates by writing a custom template context processor that would set a variable (e.g., SITE_NAME) in the context for every template.

Upvotes: 3

Related Questions