Greetings to all! I'm new to Django, but I've been digging for weeks. I am building a basic site around Django, and I am very excited that he himself and his capabilities. My question may sound "noob," and if so, please do not complain.
I developed a news feed, pages, comments, a taxonomy and a bunch of other things that are now ready for use, but when I came to the point where I had to apply the template to my website, I suddenly thought that I missed something - static text.
You know that all websites have some kind of static text everywhere, such as copyright notice, some slogan text, introductory text on the main page, some text and / or images in the sidebars that are static. I know that all of them can be broken down into models, but I don’t like the overhead of doing this for every small bit of text / raw html data on my site.
I thought about using a single model containing the name of the html block and its contents, and then selecting those that apply to a particular view and pass the contents to the template. So my question is the right thing? Will I store a copyright notice at the bottom of my site in a database? I could use one dictionary to store all the text blocks available for convenient use in my templates, but what if their number becomes very large? Should I request only those that I need in all my views? Or should I introduce a special template tag to do the job for me?
Just to give you an idea, here are two options that I mean:
{% load text %}
{% text some-text-label %}
{{ text.some-text-label %}
How exactly did you solve this problem?
? , , , , , . HTML, - ( ). , , ;)
!