-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CMS] Ajout de pages "privée" de wagtails (#1054)
* add private list pages * add redirect login url for wagtail pages * add template for paid article list * remove useless field in admin
- Loading branch information
1 parent
de1312d
commit ffb3cae
Showing
5 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 4.2.9 on 2024-01-24 16:21 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("cms", "0008_alter_homepage_content"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="PaidArticleList", | ||
fields=[ | ||
( | ||
"articlelist_ptr", | ||
models.OneToOneField( | ||
auto_created=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
parent_link=True, | ||
primary_key=True, | ||
serialize=False, | ||
to="cms.articlelist", | ||
), | ||
), | ||
], | ||
options={ | ||
"abstract": False, | ||
}, | ||
bases=("cms.articlelist",), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{% extends "layouts/base.html" %} | ||
{% load wagtailcore_tags wagtailimages_tags wagtailroutablepage_tags %} | ||
{% block meta_description %}<meta name="description" content="{{ page.search_description }}">{% endblock %} | ||
{% block title %}{{ page.seo_title }} {{ block.super }}{% endblock %} | ||
{% block body_class %}p-ressources{{ block.super }}{% endblock %} | ||
{% block breadcrumbs %} | ||
<section> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<nav class="c-breadcrumb c-breadcrumb--marche" aria-label="breadcrumb"> | ||
<ol class="breadcrumb"> | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'wagtail_serve' '' %}">Accueil</a> | ||
</li> | ||
<li class="breadcrumb-item active" aria-current="page">{{ page.title }}</li> | ||
</ol> | ||
</nav> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
{% endblock breadcrumbs %} | ||
{% block content %} | ||
<section class="s-title-01 mb-0"> | ||
<div class="s-title-01__container container"> | ||
<div class="s-title-01__row row"> | ||
<div class="s-title-01__col col-12 col-lg-9"> | ||
<h1 class="s-title-01__title h1"> | ||
<strong>{{ page.title }}</strong> | ||
</h1> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
<section class="s-section mt-0 has-illustration-bg-02"> | ||
<div class="s-section__container container"> | ||
<div class="s-section__row row row-cols-1 row-cols-md-2 row-cols-lg-3 mt-5"> | ||
{% for article in article_list %} | ||
<div class="s-section__col col mb-3 mb-lg-5">{% include "cms/article_item.html" with article=article %}</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</section> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters