How to store static text on a website using django

I am new to django and I think this is a pretty fundamental question.

Suppose I have this topic:

enter image description here

I already made a project, so I know a little about how to create models for dynamic content, transfer them to views and the admin panel, etc., but:

Question: in the image above I marked 3 containers that contain text. There is only one copy of this text on this site, and it is not repeated. If I developed it for myself, I would just do it with hard code, but what if I develop for the client, who should be able to edit these fields using the admin panel?

, (, 20) -, ( [:1]), ?

, . , .

+5
2

, , TextField CharField , , , .

class Blurb(models.Model):
  ident = models.CharField(..., db_index=True)
  blurb = models.TextField(...)

PK  ident  text
1   main   Hey! Do you like this template? This...

{% load blurb %}
 ...
{% blurb main %}
+4

1 , .

- :

class SomeText(models.Model):
    position = models.CharField(max_length=120, choices=POSITION_DESCRIPTORS)
    text = models.TextField()
+2
source

All Articles