diff --git a/apps/content_pages/migrations/0010_link_action_text.py b/apps/content_pages/migrations/0010_link_action_text.py new file mode 100644 index 00000000..f6f50813 --- /dev/null +++ b/apps/content_pages/migrations/0010_link_action_text.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.25 on 2024-10-30 13:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('content_pages', '0009_embedcode'), + ] + + operations = [ + migrations.AddField( + model_name='link', + name='action_text', + field=models.CharField(default='Перейти', max_length=50, verbose_name='Текст на кнопке'), + ), + ] diff --git a/apps/content_pages/models/content_items.py b/apps/content_pages/models/content_items.py index d687dc05..d455af1f 100644 --- a/apps/content_pages/models/content_items.py +++ b/apps/content_pages/models/content_items.py @@ -50,6 +50,11 @@ class Link(AbstractItemWithTitle): verbose_name="Описание ссылки", ) url = models.URLField() + action_text = models.CharField( + max_length=50, + default="Перейти", + verbose_name="Текст на кнопке", + ) class Meta: verbose_name = "Ссылка с описанием" diff --git a/apps/content_pages/serializers/content_items.py b/apps/content_pages/serializers/content_items.py index ed3f2293..b13b9246 100644 --- a/apps/content_pages/serializers/content_items.py +++ b/apps/content_pages/serializers/content_items.py @@ -63,6 +63,7 @@ class Meta: "title", "description", "url", + "action_text", ) diff --git a/poetry.lock b/poetry.lock index 63d20cd3..2c443295 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2707,13 +2707,13 @@ files = [ [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.0.6" description = "The comprehensive WSGI web application library." optional = false python-versions = ">=3.8" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.0.6-py3-none-any.whl", hash = "sha256:1bc0c2310d2fbb07b1dd1105eba2f7af72f322e1e455f2f93c993bee8c8a5f17"}, + {file = "werkzeug-3.0.6.tar.gz", hash = "sha256:a8dd59d4de28ca70471a34cba79bed5f7ef2e036a76b3ab0835474246eb41f8d"}, ] [package.dependencies] @@ -2760,4 +2760,4 @@ requests = "*" [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "f5bdd2deb4502a2508316b61b9af19f70c4470f49c860f6b95ce74cfd53500da" +content-hash = "131c27b9a1ebaf8ee622d40a3137d1d5782e737b242d28eff2388b89f921792c" diff --git a/pyproject.toml b/pyproject.toml index 0403d240..e5141207 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ yadisk = "^1.2.15" django-filer = "^3.1.0" certifi = "^2024.8.30" pip = "^24.0" -werkzeug = "^3.0.4" +werkzeug = "3.0.6" urllib3 = "^2.2.2" requests = "^2.32.3" cryptography = "^43.0.1" diff --git a/requirements/dev.txt b/requirements/dev.txt index 426d5640..3e58152e 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -131,6 +131,6 @@ urllib3==2.2.2 ; python_version >= "3.9" and python_version < "4.0" virtualenv==20.25.0 ; python_version >= "3.9" and python_version < "4.0" wcwidth==0.2.12 ; python_version >= "3.9" and python_version < "4.0" webencodings==0.5.1 ; python_version >= "3.9" and python_version < "4.0" -werkzeug==3.0.4 ; python_version >= "3.9" and python_version < "4.0" +werkzeug==3.0.6 ; python_version >= "3.9" and python_version < "4.0" xhtml2pdf==0.2.11 ; python_version >= "3.9" and python_version < "4.0" yadisk==1.3.4 ; python_version >= "3.9" and python_version < "4.0" diff --git a/requirements/prod.txt b/requirements/prod.txt index 0b977632..1636aff6 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -99,6 +99,6 @@ uritemplate==4.1.1 ; python_version >= "3.9" and python_version < "4.0" uritools==4.0.2 ; python_version >= "3.9" and python_version < "4.0" urllib3==2.2.2 ; python_version >= "3.9" and python_version < "4.0" webencodings==0.5.1 ; python_version >= "3.9" and python_version < "4.0" -werkzeug==3.0.4 ; python_version >= "3.9" and python_version < "4.0" +werkzeug==3.0.6 ; python_version >= "3.9" and python_version < "4.0" xhtml2pdf==0.2.11 ; python_version >= "3.9" and python_version < "4.0" yadisk==1.3.4 ; python_version >= "3.9" and python_version < "4.0"