I'm working on a web page. There will be contact in the footer
like email or telephone. This footer
should be everywhere so it is in the base.html
which is being extended by each template/html
.
I've created a table called ContactAdmin
, to provide simple and straightforward interface for admin to change his contact info. And here is the problem.
The base.html
has no view (it is just for extending) so I don't know how to put there variable - email
, telephone
from table ContactAdmin
. I thought about putting it into every view which is a huge overkill in my opinion.
So how to make Django to read this variables from database and put them into base.html
?
The ContactAdmin table should have just one row