finalizing activities cards
10
README.md
@@ -20,16 +20,6 @@
|
||||
|
||||
` env/bin/pip install -e ".[testing]" `
|
||||
|
||||
- Initialize and upgrade the database using Alembic.
|
||||
|
||||
- Generate your first revision.
|
||||
|
||||
`env/bin/alembic -c development.ini revision --autogenerate -m "init" `
|
||||
|
||||
- Upgrade to that revision.
|
||||
|
||||
`env/bin/alembic -c development.ini upgrade head `
|
||||
|
||||
- Load default data into the database using a script.
|
||||
|
||||
` env/bin/initialize_cao_blogr_db development.ini `
|
||||
|
||||
BIN
cao_sunyata.sqlite
Executable file → Normal file
@@ -1,58 +0,0 @@
|
||||
"""Pyramid bootstrap environment. """
|
||||
from alembic import context
|
||||
from pyramid.paster import get_appsettings, setup_logging
|
||||
from sqlalchemy import engine_from_config
|
||||
|
||||
from cao_sunyata.models.meta import Base
|
||||
|
||||
config = context.config
|
||||
|
||||
setup_logging(config.config_file_name)
|
||||
|
||||
settings = get_appsettings(config.config_file_name)
|
||||
target_metadata = Base.metadata
|
||||
|
||||
|
||||
def run_migrations_offline():
|
||||
"""Run migrations in 'offline' mode.
|
||||
|
||||
This configures the context with just a URL
|
||||
and not an Engine, though an Engine is acceptable
|
||||
here as well. By skipping the Engine creation
|
||||
we don't even need a DBAPI to be available.
|
||||
|
||||
Calls to context.execute() here emit the given string to the
|
||||
script output.
|
||||
|
||||
"""
|
||||
context.configure(url=settings['sqlalchemy.url'])
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
def run_migrations_online():
|
||||
"""Run migrations in 'online' mode.
|
||||
|
||||
In this scenario we need to create an Engine
|
||||
and associate a connection with the context.
|
||||
|
||||
"""
|
||||
engine = engine_from_config(settings, prefix='sqlalchemy.')
|
||||
|
||||
connection = engine.connect()
|
||||
context.configure(
|
||||
connection=connection,
|
||||
target_metadata=target_metadata
|
||||
)
|
||||
|
||||
try:
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
finally:
|
||||
connection.close()
|
||||
|
||||
|
||||
if context.is_offline_mode():
|
||||
run_migrations_offline()
|
||||
else:
|
||||
run_migrations_online()
|
||||
@@ -1,22 +0,0 @@
|
||||
"""${message}
|
||||
|
||||
Revision ID: ${up_revision}
|
||||
Revises: ${down_revision | comma,n}
|
||||
Create Date: ${create_date}
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
${imports if imports else ""}
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = ${repr(up_revision)}
|
||||
down_revision = ${repr(down_revision)}
|
||||
branch_labels = ${repr(branch_labels)}
|
||||
depends_on = ${repr(depends_on)}
|
||||
|
||||
def upgrade():
|
||||
${upgrades if upgrades else "pass"}
|
||||
|
||||
def downgrade():
|
||||
${downgrades if downgrades else "pass"}
|
||||
@@ -1,26 +0,0 @@
|
||||
"""init
|
||||
|
||||
Revision ID: a35fa375a82f
|
||||
Revises:
|
||||
Create Date: 2022-05-10 08:28:42.146580
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'a35fa375a82f'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('topics', sa.Column('topic_quote', sa.Unicode(length=255), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('topics', 'topic_quote')
|
||||
# ### end Alembic commands ###
|
||||
@@ -1,26 +0,0 @@
|
||||
"""init
|
||||
|
||||
Revision ID: 6da5ee6785ff
|
||||
Revises: a35fa375a82f
|
||||
Create Date: 2022-05-18 10:33:38.599975
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '6da5ee6785ff'
|
||||
down_revision = 'a35fa375a82f'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('status', sa.Unicode(length=50), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('entries', 'status')
|
||||
# ### end Alembic commands ###
|
||||
@@ -1,28 +0,0 @@
|
||||
"""init
|
||||
|
||||
Revision ID: 91bc91a0dfc5
|
||||
Revises: 6da5ee6785ff
|
||||
Create Date: 2022-09-29 13:47:36.479683
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '91bc91a0dfc5'
|
||||
down_revision = '6da5ee6785ff'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('creator', sa.Unicode(length=50), nullable=True))
|
||||
op.add_column('entries', sa.Column('editor', sa.Unicode(length=50), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('entries', 'editor')
|
||||
op.drop_column('entries', 'creator')
|
||||
# ### end Alembic commands ###
|
||||
@@ -1 +0,0 @@
|
||||
Placeholder for alembic versions
|
||||
@@ -11,7 +11,7 @@ def get_entries_by_topic(request, topic, tag):
|
||||
else:
|
||||
if request.authenticated_userid != 'admin':
|
||||
# if user is not 'admin', hide admin posts
|
||||
query = query + " AND tag =! '_admin'"
|
||||
query = query + " AND tag != '_admin'"
|
||||
if tag != '':
|
||||
query = query + " AND tag = '{0}'".format(tag)
|
||||
|
||||
@@ -66,14 +66,14 @@ def get_last_edited(request):
|
||||
# if user is anonym, display only published posts
|
||||
query = query + " AND status='publié'"
|
||||
|
||||
query = query + " ORDER BY edited LIMIT 10;"
|
||||
query = query + " ORDER BY edited DESC LIMIT 10;"
|
||||
results = request.dbsession.execute(query).fetchall()
|
||||
return results
|
||||
|
||||
def get_activities(request):
|
||||
# gest the Activities section
|
||||
query = "SELECT * FROM entries WHERE topic_id = '_admin' AND tag = 'activities' AND status = 'publié' ORDER BY created;"
|
||||
results = request.dbsession.execute(query,).first()
|
||||
query = "SELECT * FROM entries WHERE topic_id = '_admin' AND title like 'Activities - column%' ORDER BY title;"
|
||||
results = request.dbsession.execute(query,).all()
|
||||
return results
|
||||
|
||||
def get_tags_byTopic(request, topic):
|
||||
|
||||
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
BIN
cao_sunyata/static/img/home/home_activity1.jpeg
Normal file
|
After Width: | Height: | Size: 242 KiB |
BIN
cao_sunyata/static/img/home/home_activity2.jpg
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
cao_sunyata/static/img/home/home_activity3.jpg
Normal file
|
After Width: | Height: | Size: 250 KiB |
@@ -5,7 +5,7 @@
|
||||
<div class="card mb-0">
|
||||
<div class="card-body">
|
||||
|
||||
<form action="{{ url }}" method="post" class="form">
|
||||
<form action="{{ url }}" method="post" class="form needs-validation">
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label required-field" for="title">Titre</label>
|
||||
@@ -62,7 +62,7 @@
|
||||
<a class="btn btn-light" href="{{ request.route_url('topic', topic=entry.topic_id) }}">Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">Enregistrer</button>
|
||||
{% if blog_id != '0' %}
|
||||
<button class="btn btn-danger" type="button" data-toggle="modal" data-target="#confirmDelete">Supprimer</button>
|
||||
<button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#confirmDelete">Supprimer</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -72,26 +72,23 @@
|
||||
</form>
|
||||
|
||||
<!-- Modal : Confirmation SUPRESSION -->
|
||||
<div id="confirmDelete" class="modal" role="dialog">
|
||||
<div id="confirmDelete" class="modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Supprimer une page</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- The form is placed inside the body of modal -->
|
||||
<p>Etes-vous certain(e) de vouloir supprimer <b>{{ entry.title }}</b> ?</p>
|
||||
<p>Etes-vous certain(e) de vouloir supprimer <b><br>
|
||||
{{ entry.title }}</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group">
|
||||
<div class="text-center">
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
<button type="button" class="btn btn-success" data-bs-dismiss="modal">Fermer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<div class="row">
|
||||
<!-- Carousel -->
|
||||
<div class="card p-0 mb-3">
|
||||
<div class="card p-0 mb-4">
|
||||
<div class="card-body p-0">
|
||||
<div id="myCarousel" class="carousel slide" data-bs-ride="carousel">
|
||||
|
||||
@@ -66,14 +66,58 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Container (ACTIVITES Section) -->
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
{{ activities | safe }}
|
||||
{% if request.authenticated_userid %}
|
||||
<div class="text-center"><a href="/blog/134/activites-%253A-affiche-sur-homepage">Modifier "Nos activités"</a></div>
|
||||
{% endif %}
|
||||
<div class="col-lg-4">
|
||||
<div class="card overflow-hidden hover-img">
|
||||
<div class="position-relative">
|
||||
<img src="{{request.static_url('cao_sunyata:static/img/home/home_activity1.jpeg')}}" class="card-img-top">
|
||||
<span class="badge text-bg-light text-dark fs-2 lh-sm mb-9 me-9 py-1 px-2 fw-semibold position-absolute bottom-0 end-0">
|
||||
à Noisy-le-Grand</span>
|
||||
</div>
|
||||
<!-- Activites - colonne 1 -->
|
||||
<div class="card-body text-center pb-3">
|
||||
{{ activity_col1 | safe }}
|
||||
{% if request.authenticated_userid %}
|
||||
<p class="text-left fs-2"> <a href="{{ request.route_url('blog', id=32, slug='slug') }}">[Modifier ce bloc]</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card overflow-hidden hover-img">
|
||||
<div class="position-relative">
|
||||
<img src="{{request.static_url('cao_sunyata:static/img/home/home_activity2.jpg')}}" class="card-img-top" alt="matdash-img">
|
||||
<span class="badge text-bg-light text-dark fs-2 lh-sm mb-9 me-9 py-1 px-2 fw-semibold position-absolute bottom-0 end-0">
|
||||
sur Zoom</span>
|
||||
</div>
|
||||
<!-- Activites - colonne 2 -->
|
||||
<div class="card-body text-center pb-3">
|
||||
{{ activity_col2 | safe }}
|
||||
{% if request.authenticated_userid %}
|
||||
<p class="text-left fs-2"> <a href="{{ request.route_url('blog', id=40, slug='slug') }}">[Modifier ce bloc]</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card overflow-hidden hover-img">
|
||||
<div class="position-relative">
|
||||
<img src="{{request.static_url('cao_sunyata:static/img/home/home_activity3.jpg')}}" class="card-img-top" alt="matdash-img">
|
||||
<span class="badge text-bg-light text-dark fs-2 lh-sm mb-9 me-9 py-1 px-2 fw-semibold position-absolute bottom-0 end-0">
|
||||
Evènement</span>
|
||||
</div>
|
||||
<!-- Activites - colonne 3 -->
|
||||
<div class="card-body text-center pb-3">
|
||||
{{ activity_col3 | safe }}
|
||||
{% if request.authenticated_userid %}
|
||||
<p class="text-left fs-2"> <a href="{{ request.route_url('blog', id=207, slug='slug') }}">[Modifier ce bloc]</a></p>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -105,11 +149,15 @@
|
||||
</div>
|
||||
|
||||
<!-- Container (Méditation SUNYATA Section) -->
|
||||
<p class="text-center">Le centre de Méditation SUNYATA Paris est une branche du <a href="http://www.sunyatameditation.org/">SUNYATA Méditation Center</a> dont le siège est à Perris, CA, Etats-Unis.
|
||||
</div>
|
||||
|
||||
<p class="text-center">Méditation SUNYATA Paris est une branche du <a href="http://www.sunyatameditation.org/">SUNYATA Méditation Center</a> dont le siège est à Perris, CA, Etats-Unis.<br>
|
||||
Notre but est de promouvoir la pratique de la méditation et du QiGong SUNYATA à Paris.
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card ms-3">
|
||||
<div class="card-body p-3">
|
||||
<h5 class="mb-4 text-center">La Méditation SUNYATA</h5>
|
||||
<p class="text-center"><img src="{{ request.static_url('cao_sunyata:static/ni-su.jpg') }}"
|
||||
@@ -133,7 +181,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card me-3">
|
||||
<div class="card-body p-3">
|
||||
<h5 class="mb-4 text-center">La technique « PARLE PAS »</h5>
|
||||
<p class="text-center"><img src="{{ request.static_url('cao_sunyata:static/khong-noi.jpg') }}"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<a class="btn btn-light" href="{{ request.route_url('images') }}"><span class="ti ti-chevron-left fs-4"></span> Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="ti ti-check fs-4"></span> Renommer</button>
|
||||
<button class="btn btn-danger" type="button" data-toggle="modal" data-target="#confirmDelete">
|
||||
<button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#confirmDelete">
|
||||
<span class="ti ti-x fs-4"></span> Supprimer</button>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Supprimer une IMAGES</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -44,14 +43,11 @@
|
||||
<b>{{ filename }}</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group">
|
||||
<div class="text-center">
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
<button type="button" class="btn btn-success" data-bs-dismiss="modal">Fermer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Fermer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -101,10 +101,38 @@
|
||||
<span class="hide-menu">Contact</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-small-cap">
|
||||
<iconify-icon icon="solar:menu-dots-linear" class="nav-small-cap-icon fs-6" class="fs-6"></iconify-icon>
|
||||
<span class="hide-menu">SUNYATA sur le Web</span>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<a class="sidebar-link" href="./sample-page.html" aria-expanded="false">
|
||||
<span><i class="ti ti-yoga fs-6"></i></span>
|
||||
<span class="hide-menu">Sample Page</span>
|
||||
<a class="sidebar-link" href="https://tanhkhong.org" aria-expanded="false">
|
||||
<span><i class="ti ti-world fs-4"></i></span>
|
||||
<span class="hide-menu">tanhkhong.org</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<a class="sidebar-link" href="http://www.sunyatameditation.org/" aria-expanded="false">
|
||||
<span><i class="ti ti-world fs-4"></i></span>
|
||||
<span class="hide-menu">sunyatameditation.org</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<a class="sidebar-link" href="https://www.sunyata-bw.de/" aria-expanded="false">
|
||||
<span><i class="ti ti-world fs-4"></i></span>
|
||||
<span class="hide-menu">sunyata-bw.de</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<a class="sidebar-link" href="http://www.sunyata-meditation-ch.org/" aria-expanded="false">
|
||||
<span><i class="ti ti-world fs-4"></i></span>
|
||||
<span class="hide-menu">sunyata-meditation-ch.org</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<a class="sidebar-link" href="https://www.facebook.com/Sacramento.Tanhkhong" aria-expanded="false">
|
||||
<span><i class="ti ti-world fs-4"></i></span>
|
||||
<span class="hide-menu">FB/Sacramento</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
{% extends "layout.jinja2" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card mb-0">
|
||||
<div class="card-body">
|
||||
|
||||
<form action="{{ url }}" method="post" role="form">
|
||||
<form action="{{ url }}" method="post" class="form needs-validation">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="required-field" for="tag">Tag</label>
|
||||
<div class="mb-3">
|
||||
<label class="form-label required-field" for="tag">Tag</label>
|
||||
<input class="form-control" name="tag" type="text" value="{{entry.tag}}" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="required-field" for="tag_name">Intitulé</label>
|
||||
<div class="mb-3">
|
||||
<label class="form-label required-field" for="tag_name">Intitulé</label>
|
||||
<input class="form-control" name="tag_name" type="text" value="{{entry.tag_name}}" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="{{ request.route_url('topic_edit', topic=topic) }}">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<div class="mb-3">
|
||||
<a class="btn btn-light" href="{{ request.route_url('topic_edit', topic=topic) }}">
|
||||
<span class="ti ti-chevron-left"></span> Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<span class="ti ti-check"></span> Enregistrer</button>
|
||||
{% if entry.tag != '0' %}
|
||||
<button class="btn btn-danger" type="button" data-toggle="modal" data-target="#confirmDelete">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
<button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#confirmDelete">
|
||||
<span class="ti ti-x"></span> Supprimer</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -29,11 +31,10 @@
|
||||
</form>
|
||||
|
||||
<!-- Modal : Confirmation SUPRESSION -->
|
||||
<div id="confirmDelete" class="modal" role="dialog">
|
||||
<div id="confirmDelete" class="modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Supprimer le Tag</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -41,16 +42,16 @@
|
||||
<p>Etes-vous certain(e) de vouloir supprimer le Tag <b>{{ tag_name }}</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group">
|
||||
<div class="text-center">
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
</form>
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
<button type="button" class="btn btn-success" data-bs-dismiss="modal">Fermer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="card mb-0">
|
||||
<div class="card-body">
|
||||
|
||||
<form action="{{ url }}" method="post" role="form">
|
||||
<form action="{{ url }}" method="post" class="form needs-validation">
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label required-field" for="topic">Topic</label>
|
||||
@@ -29,7 +29,7 @@
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="ti ti-check"></span> Enregistrer</button>
|
||||
{% if entry.topic != '0' %}
|
||||
<button class="btn btn-danger" type="button" data-toggle="modal" data-target="#confirmDelete">
|
||||
<button class="btn btn-danger" type="button" data-bs-toggle="modal" data-bs-target="#confirmDelete">
|
||||
<span class="ti ti-x"></span> Supprimer</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -67,7 +67,6 @@
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Supprimer le Topic</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -75,11 +74,10 @@
|
||||
<p>Etes-vous certain(e) de vouloir supprimer le Topic <b>{{ entry.topic_name }}</b> ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="form-group">
|
||||
<div class="text-center">
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
</form>
|
||||
<form id="confirmForm" method="post">
|
||||
<button type="submit" class="btn btn-danger" name="form.deleted">Supprimer</button>
|
||||
<button type="button" class="btn btn-success" data-bs-dismiss="modal">Fermer</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,16 +41,20 @@ def home(request):
|
||||
dir + '/S25.jpg']
|
||||
|
||||
# get the Activities section
|
||||
activ = get_activities(request)
|
||||
activities = get_activities(request)
|
||||
# insèrer le path de static/img
|
||||
activities = activ.body.replace('static/', "%s/static/" % request.application_url)
|
||||
activity_col1 = activities[0].body.replace('static/', "%s/static/" % request.application_url)
|
||||
activity_col2 = activities[1].body.replace('static/', "%s/static/" % request.application_url)
|
||||
activity_col3 = activities[2].body.replace('static/', "%s/static/" % request.application_url)
|
||||
# get the last created posts
|
||||
last_ten = get_last_created(request)
|
||||
|
||||
return {
|
||||
'page_title': "",
|
||||
'last_ten': last_ten,
|
||||
'activities': activities,
|
||||
'activity_col1': activity_col1,
|
||||
'activity_col2': activity_col2,
|
||||
'activity_col3': activity_col3,
|
||||
'car_images': car_images,
|
||||
}
|
||||
|
||||
|
||||
@@ -47,12 +47,6 @@ setup = cao_sunyata.pshell.setup
|
||||
# wsgi server configuration
|
||||
###
|
||||
|
||||
[alembic]
|
||||
# path to migration scripts
|
||||
script_location = cao_sunyata/alembic
|
||||
file_template = %%(year)d%%(month).2d%%(day).2d_%%(rev)s
|
||||
# file_template = %%(rev)s_%%(slug)s
|
||||
|
||||
[server:main]
|
||||
use = egg:waitress#main
|
||||
listen = localhost:9180
|
||||
|
||||
@@ -37,12 +37,6 @@ setup = cao_sunyata.pshell.setup
|
||||
# wsgi server configuration
|
||||
###
|
||||
|
||||
[alembic]
|
||||
# path to migration scripts
|
||||
script_location = cao_sunyata/alembic
|
||||
file_template = %%(year)d%%(month).2d%%(day).2d_%%(rev)s
|
||||
# file_template = %%(rev)s_%%(slug)s
|
||||
|
||||
[server:main]
|
||||
use = egg:waitress#main
|
||||
listen = *:9180
|
||||
|
||||