~homeworkprod/byceps

37e022c66bc6af0f131cf69068ccc1beeb8c4561 — Jochen Kupperschmidt 1 year, 2 months ago f3e2538
Move news blueprint into `site` subpackage
6 files changed, 12 insertions(+), 12 deletions(-)

M byceps/application.py
R byceps/blueprints/{news/__init__.py => site/news/__init__.py}
R byceps/blueprints/{news/templates/news/_item.html => site/news/templates/site/news/_item.html}
R byceps/blueprints/{news/templates/news/index.html => site/news/templates/site/news/index.html}
R byceps/blueprints/{news/templates/news/view.html => site/news/templates/site/news/view.html}
R byceps/blueprints/{news/views.py => site/news/views.py}
M byceps/application.py => byceps/application.py +1 -1
@@ 114,7 114,7 @@ def _get_blueprints_site() -> Iterator[BlueprintReg]:
        ('site.attendance',             '/attendance'               ),
        ('site.board',                  '/board'                    ),
        ('site.consent',                '/consent'                  ),
        ('news',                        '/news'                     ),
        ('site.news',                   '/news'                     ),
        ('newsletter',                  '/newsletter'               ),
        ('orga_team',                   '/orgas'                    ),
        ('party',                       None                        ),

R byceps/blueprints/news/__init__.py => byceps/blueprints/site/news/__init__.py +0 -0
R byceps/blueprints/news/templates/news/_item.html => byceps/blueprints/site/news/templates/site/news/_item.html +0 -0
R byceps/blueprints/news/templates/news/index.html => byceps/blueprints/site/news/templates/site/news/index.html +1 -1
@@ 9,7 9,7 @@

  <div class="news-items">
    {%- for item in items.items %}
{%- include 'news/_item.html' %}
{%- include 'site/news/_item.html' %}
    {%- endfor %}

{{ render_pagination_nav(items, 'news.index') }}

R byceps/blueprints/news/templates/news/view.html => byceps/blueprints/site/news/templates/site/news/view.html +1 -1
@@ 10,6 10,6 @@
    </ol>
  </nav>

{%- include 'news/_item.html' %}
{%- include 'site/news/_item.html' %}

{%- endblock %}

R byceps/blueprints/news/views.py => byceps/blueprints/site/news/views.py +9 -9
@@ 1,6 1,6 @@
"""
byceps.blueprints.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
byceps.blueprints.site.news.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.


@@ 10,17 10,17 @@ import dataclasses

from flask import abort, g

from ...services.news import html_service as news_html_service
from ...services.news import service as news_item_service
from ...services.site import (
from ....services.news import html_service as news_html_service
from ....services.news import service as news_item_service
from ....services.site import (
    service as site_service,
    settings_service as site_settings_service,
)
from ...util.framework.blueprint import create_blueprint
from ...util.framework.templating import templated
from ....util.framework.blueprint import create_blueprint
from ....util.framework.templating import templated

from ..admin.news.authorization import NewsItemPermission
from ..authorization.registry import permission_registry
from ...admin.news.authorization import NewsItemPermission
from ...authorization.registry import permission_registry


blueprint = create_blueprint('news', __name__)