Skip to content

Commit

Permalink
Merge pull request #328 from maykinmedia/develop
Browse files Browse the repository at this point in the history
Release v1.0.6
  • Loading branch information
alextreme authored Nov 15, 2022
2 parents 16c85e9 + 6f11dc2 commit cb0b4c0
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 11 deletions.
3 changes: 2 additions & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Prerequisites

You need the following libraries and/or programs:

* `Python`_ 3.8 or above
* `Python`_ 3.9 or above
* Python `Virtualenv`_ and `Pip`_
* `PostgreSQL`_ 10 or above with PostGIS extension
* `Node.js`_
Expand Down Expand Up @@ -161,6 +161,7 @@ environment variables. You can persist these in your ``local.py`` settings
file or as part of the ``(post)activate`` of your virtualenv.

* ``SECRET_KEY``: the secret key to use. A default is set in ``dev.py``
* ``DIGID_MOCK``: determines if a mock-DigiD interface is to be shown on the frontend, if configured in the admin this has to be set to ``True`` to avoid switching to the mock-authentication by accident.

* ``DB_NAME``: name of the database for the project. Defaults to ``open_inwoner``.
* ``DB_USER``: username to connect to the database with. Defaults to ``open_inwoner``.
Expand Down
4 changes: 3 additions & 1 deletion src/open_inwoner/accounts/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ def __call__(self, request):

# If the user is currently not editing their information, but it is required
# redirect to that view.

# DigiD can be disabled, in which case the digid app isn't available
digid_logout = "/digid/logout/"
try:
digid_logout = reverse("digid:logout")
except:
except: # nosec
pass
if (
not request.path.startswith(
Expand Down
2 changes: 1 addition & 1 deletion src/open_inwoner/conf/local_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "open_inwoner",
"USER": "open_inwoner",
"PASSWORD": "open_inwoner",
Expand Down
4 changes: 4 additions & 0 deletions src/open_inwoner/configurations/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ class SiteConfigurarionAdmin(OrderedInlineModelAdminMixin, SingletonModelAdmin):
"home_map_intro",
"theme_title",
"theme_intro",
"home_questionnaire_title",
"home_questionnaire_subtitle",
"select_questionnaire_title",
"select_questionnaire_subtitle",
),
},
),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Generated by Django 3.2.15 on 2022-11-10 13:58

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("configurations", "0020_siteconfiguration_login_show"),
]

operations = [
migrations.AddField(
model_name="siteconfiguration",
name="home_questionnaire_subtitle",
field=models.CharField(
default="Test met een paar simpele vragen of u recht heeft op een product",
help_text="Questionnaire sub-title on the home page.",
max_length=255,
verbose_name="Home page questionaire sub-title",
),
),
migrations.AddField(
model_name="siteconfiguration",
name="home_questionnaire_title",
field=models.CharField(
default="Waar bent u naar op zoek?",
help_text="Questionnaire title on the home page.",
max_length=255,
verbose_name="Home page questionaire title",
),
),
migrations.AddField(
model_name="siteconfiguration",
name="select_questionnaire_subtitle",
field=models.CharField(
default="Kies hieronder één van de volgende vragenlijsten om de zelfdiagnose te starten.",
help_text="Questionaire selector sub-title on the theme and profile pages.",
max_length=255,
verbose_name="Questionaire selector widget sub-title",
),
),
migrations.AddField(
model_name="siteconfiguration",
name="select_questionnaire_title",
field=models.CharField(
default="Keuze zelfdiagnose?",
help_text="Questionaire selector title on the theme and profile pages.",
max_length=255,
verbose_name="Questionaire selector widget title",
),
),
]
26 changes: 26 additions & 0 deletions src/open_inwoner/configurations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,32 @@ class SiteConfiguration(SingletonModel):
blank=True,
help_text=_("Map's intro text on the home page."),
)
home_questionnaire_title = models.CharField(
max_length=255,
default=_("Waar bent u naar op zoek?"),
verbose_name=_("Home page questionaire title"),
help_text=_("Questionnaire title on the home page."),
)
home_questionnaire_subtitle = models.CharField(
max_length=255,
default=_("Test met een paar simpele vragen of u recht heeft op een product"),
verbose_name=_("Home page questionaire sub-title"),
help_text=_("Questionnaire sub-title on the home page."),
)
select_questionnaire_title = models.CharField(
max_length=255,
default=_("Keuze zelfdiagnose?"),
verbose_name=_("Questionaire selector widget title"),
help_text=_("Questionaire selector title on the theme and profile pages."),
)
select_questionnaire_subtitle = models.CharField(
max_length=255,
default=_(
"Kies hieronder één van de volgende vragenlijsten om de zelfdiagnose te starten."
),
verbose_name=_("Questionaire selector widget sub-title"),
help_text=_("Questionaire selector sub-title on the theme and profile pages."),
)
footer_visiting_title = models.CharField(
max_length=255,
default="",
Expand Down
4 changes: 2 additions & 2 deletions src/open_inwoner/templates/pages/category/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ <h1 class="h1">
<div class="grid">
<div class="column column--start-1 column--span-6 ">
<aside class="questionnaire">
<h2 class="h2">{% trans "Keuze zelfdiagnose?" %}</h2>
<p class="p">{% trans "Kies hieronder één van de volgende vragenlijsten om de zelfdiagnose te starten." %}</p>
<h2 class="h2">{{configurable_text.questionnaire_page.select_questionnaire_title}}</h2>
<p class="p">{{configurable_text.questionnaire_page.select_questionnaire_subtitle}}</p>
{% questionnaire root_nodes=questionnaire_roots %}
</aside>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/open_inwoner/templates/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ <h2 class="h2">
{% endif %}

{% if questionnaire_roots.exists %}
<h2 class="h2">{% trans "Waar bent u naar op zoek?" %}</h2>
<p class="p">{% trans "Wij helpen u graag op weg." %}</p>
<h2 class="h2">{{configurable_text.home_page.home_questionnaire_title}}</h2>
<p class="p">{{configurable_text.home_page.home_questionnaire_subtitle}}</p>

{% questionnaire root_nodes=questionnaire_roots %}
{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions src/open_inwoner/templates/pages/profile/questionnaire.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{% load i18n questionnaire_tags %}

{% block content %}
<h1 class="h1">{% trans "Keuze zelfdiagnose" %}</h1>
<p class="p">{% trans "Kies hieronder één van de volgende vragenlijsten om de zelfdiagnose te starten." %}</p>
<h1 class="h1">{{configurable_text.questionnaire_page.select_questionnaire_title}}</h1>
<p class="p">{{configurable_text.questionnaire_page.select_questionnaire_subtitle}}</p>

{% questionnaire root_nodes=root_nodes %}
{% endblock content %}
{% endblock content %}
2 changes: 1 addition & 1 deletion src/open_inwoner/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
path("digid/", include("digid_eherkenning.mock.digid_urls")),
path("digid/idp/", include("digid_eherkenning.mock.idp.digid_urls")),
] + urlpatterns


if settings.DEBUG and apps.is_installed("debug_toolbar"):
import debug_toolbar
Expand Down
6 changes: 6 additions & 0 deletions src/open_inwoner/utils/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ def settings(request):
"home_theme_intro": config.home_theme_intro,
"home_map_title": config.home_map_title,
"home_map_intro": config.home_map_intro,
"home_questionnaire_title": config.home_questionnaire_title,
"home_questionnaire_subtitle": config.home_questionnaire_subtitle,
},
"theme_page": {
"theme_title": config.theme_title,
"theme_intro": config.theme_intro,
},
"questionnaire_page": {
"select_questionnaire_title": config.select_questionnaire_title,
"select_questionnaire_subtitle": config.select_questionnaire_subtitle,
},
"footer": {
"footer_visiting_title": config.footer_visiting_title,
"footer_visiting_intro": config.footer_visiting_intro,
Expand Down

0 comments on commit cb0b4c0

Please sign in to comment.