Compare commits
2 commits
191b946a73
...
63aa3587da
Author | SHA1 | Date | |
---|---|---|---|
63aa3587da | |||
e6f7239c14 |
10 changed files with 12 additions and 15 deletions
|
@ -13,7 +13,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
args: ["--max-line-length=88", "--extend-ignore=E203"]
|
args: ["--max-line-length=88", "--extend-ignore=E203"]
|
||||||
exclude: "lps/lps/settings/"
|
exclude: "lps/lps/settings/|migrations"
|
||||||
- repo: https://github.com/Riverside-Healthcare/djLint
|
- repo: https://github.com/Riverside-Healthcare/djLint
|
||||||
rev: v1.23.3
|
rev: v1.23.3
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -8,7 +8,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("base", "0002_alter_navigationsettings_phone"),
|
("base", "0002_alter_navigationsettings_phone"),
|
||||||
("wagtailcore", "0093_uploadedfile"),
|
("wagtailcore", "0093_uploadedfile"),
|
||||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("base", "0003_formpage_formfield"),
|
("base", "0003_formpage_formfield"),
|
||||||
("wagtailimages", "0026_delete_uploadedimage"),
|
("wagtailimages", "0026_delete_uploadedimage"),
|
||||||
|
|
|
@ -26,6 +26,7 @@ class NavigationSettings(BaseGenericSetting):
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@register_setting
|
@register_setting
|
||||||
class SiteSettings(BaseGenericSetting):
|
class SiteSettings(BaseGenericSetting):
|
||||||
icon = models.ForeignKey(
|
icon = models.ForeignKey(
|
||||||
|
@ -37,9 +38,7 @@ class SiteSettings(BaseGenericSetting):
|
||||||
help_text="Icône du site",
|
help_text="Icône du site",
|
||||||
)
|
)
|
||||||
|
|
||||||
panels = [
|
panels = [MultiFieldPanel([FieldPanel("icon")], "Informations du site")]
|
||||||
MultiFieldPanel(
|
|
||||||
[FieldPanel("icon")], "Informations du site")]
|
|
||||||
|
|
||||||
|
|
||||||
class FormField(AbstractFormField):
|
class FormField(AbstractFormField):
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<section>
|
<section>
|
||||||
{{ page.thank_you_text|richtext }}
|
{{ page.thank_you_text|richtext }}
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<a href="">Retour</a>
|
<a href="">Retour</a>
|
||||||
</section>
|
</section>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
from django import template
|
from django import template
|
||||||
|
|
||||||
from wagtail.models import Site
|
from wagtail.models import Site
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag(takes_context=True)
|
@register.simple_tag(takes_context=True)
|
||||||
def get_site_root(context):
|
def get_site_root(context):
|
||||||
return Site.find_for_request(context["request"]).root_page
|
return Site.find_for_request(context["request"]).root_page
|
||||||
|
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("home", "0004_homepage_hero_text_homepage_image"),
|
("home", "0004_homepage_hero_text_homepage_image"),
|
||||||
("wagtailimages", "0026_delete_uploadedimage"),
|
("wagtailimages", "0026_delete_uploadedimage"),
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("home", "0005_homepage_icon"),
|
("home", "0005_homepage_icon"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% load static wagtailcore_tags wagtailuserbar %}
|
{% load static wagtailcore_tags wagtailuserbar wagtailimages_tags %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -30,6 +30,8 @@
|
||||||
rel="stylesheet" />
|
rel="stylesheet" />
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'css/lps.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'css/lps.css' %}">
|
||||||
{% block extra_css %}{# Override this in templates to add extra stylesheets #}{% endblock %}
|
{% block extra_css %}{# Override this in templates to add extra stylesheets #}{% endblock %}
|
||||||
|
{% image settings.base.SiteSettings.icon fill-32x32 format-png as favicon %}
|
||||||
|
<link rel="icon" href="{{ favicon.url }}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% wagtailuserbar %}
|
{% wagtailuserbar %}
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="{% pageurl site_root %}">
|
<a href="{% pageurl site_root %}">
|
||||||
{% srcset_image settings.base.SiteSettings.icon width-{64,128} %}
|
{% srcset_image settings.base.SiteSettings.icon width-{64,128} %}
|
||||||
<strong>{{ site_root.title }}</strong>
|
<strong>{{ site_root.title }}</strong>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Reference in a new issue