diff --git a/app/eleicao/cms_plugins.py b/app/eleicao/cms_plugins.py index 12fc7d78..0f467bd8 100644 --- a/app/eleicao/cms_plugins.py +++ b/app/eleicao/cms_plugins.py @@ -103,7 +103,6 @@ def render(self, context, instance, placeholder): del form.fields["uf"] del form.fields["city"] - ctx["form"] = form page_number = request.GET.get("page", 1) @@ -114,6 +113,8 @@ def render(self, context, instance, placeholder): ctx["is_paginated"] = p.count > 1 ctx["page_obj"] = page_obj ctx["object_list"] = page_obj.object_list + + ctx.update({"title": instance.title, "description": instance.description}) return ctx diff --git a/app/eleicao/migrations/0019_auto_20231123_0544.py b/app/eleicao/migrations/0019_auto_20231123_0544.py new file mode 100644 index 00000000..ace73e43 --- /dev/null +++ b/app/eleicao/migrations/0019_auto_20231123_0544.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2 on 2023-11-23 05:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('eleicao', '0018_eleicaocandidatelist'), + ] + + operations = [ + migrations.AddField( + model_name='eleicaocandidatelist', + name='description', + field=models.CharField(blank=True, max_length=120, null=True, verbose_name='Descrição'), + ), + migrations.AddField( + model_name='eleicaocandidatelist', + name='title', + field=models.CharField(blank=True, max_length=120, null=True, verbose_name='Título'), + ), + ] diff --git a/app/eleicao/models.py b/app/eleicao/models.py index 72aa7831..59d8b591 100644 --- a/app/eleicao/models.py +++ b/app/eleicao/models.py @@ -165,6 +165,8 @@ class Meta: class EleicaoCandidateList(CMSPlugin): + title = models.CharField("Título", max_length=120, blank=True, null=True) + description = models.CharField("Descrição", max_length=120, blank=True, null=True) city = models.CharField("Cidade", max_length=120, blank=True, null=True) state = models.CharField("Estado", max_length=2, blank=True, null=True, choices=lazy(get_states, list)()) diff --git a/app/eleicao/static/images/eleicao/teia-de-criadores.png b/app/eleicao/static/images/eleicao/teia-de-criadores.png new file mode 100644 index 00000000..38af47b2 Binary files /dev/null and b/app/eleicao/static/images/eleicao/teia-de-criadores.png differ diff --git a/app/eleicao/templates/eleicao/plugins/candidate_list.html b/app/eleicao/templates/eleicao/plugins/candidate_list.html index 437b0e4f..b7021105 100644 --- a/app/eleicao/templates/eleicao/plugins/candidate_list.html +++ b/app/eleicao/templates/eleicao/plugins/candidate_list.html @@ -7,8 +7,8 @@
-

Conheça as candidaturas

-

As candidatas e candidatos abaixo assumiram o compromisso com o Estatuto da Criança e do Adolescente ao se cadastrar na plataforma.

+

{{ title }}

+

{{ description }}

diff --git a/app/eleicao/templates/eleicao/plugins/footer.html b/app/eleicao/templates/eleicao/plugins/footer.html index 93199ce6..78735af5 100644 --- a/app/eleicao/templates/eleicao/plugins/footer.html +++ b/app/eleicao/templates/eleicao/plugins/footer.html @@ -30,6 +30,8 @@

Realização

alt="Alana" /> Vladimir Herzog + Teia de Criadores Minha Manaus