Fixed: ugettext has been deprecated
Fixed: Deprecatios for Django 4.0 Changed: path instead of url_path Added: fiaxateranking command
This commit is contained in:
@@ -19,9 +19,9 @@ def content_menus(request):
|
||||
:param request: a Django request object
|
||||
:return: a dict with the template variables mentioned above
|
||||
"""
|
||||
current_page = models.Page()
|
||||
current_top_page = models.Page()
|
||||
current_path = request.path_info[1:request.path_info.rfind('.')]
|
||||
current_page: models.Page = models.Page.objects.get(slug='index')
|
||||
current_top_page: models.Page = models.Page.objects.get(slug='index')
|
||||
current_path: str = request.path_info[1:request.path_info.rfind('.')]
|
||||
|
||||
# erzeuge das Top-Level Menü
|
||||
top_level_pages = cache.get('top_level_pages')
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: kasu.content\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-13 23:38+0100\n"
|
||||
"POT-Creation-Date: 2023-06-09 22:00+0200\n"
|
||||
"PO-Revision-Date: 2018-01-12 15:25+0105\n"
|
||||
"Last-Translator: b'Christian Berg <kasu@xendynastie.at>'\n"
|
||||
"Language-Team: Deutsch <>\n"
|
||||
@@ -206,7 +206,7 @@ msgstr "Erstellt am"
|
||||
msgid "share on"
|
||||
msgstr "Teile auf"
|
||||
|
||||
#: templates/content/article_detail.html:48 views.py:156
|
||||
#: templates/content/article_detail.html:48 views.py:159
|
||||
msgid "Edit Article"
|
||||
msgstr "Artikel bearbeiten"
|
||||
|
||||
@@ -249,16 +249,16 @@ msgstr "HTML spezifisch"
|
||||
msgid "This Category does not exist."
|
||||
msgstr "Diese Kategorie existiert nicht."
|
||||
|
||||
#: views.py:157
|
||||
#: views.py:160
|
||||
msgid "Create Article"
|
||||
msgstr "Artikel erstellen"
|
||||
|
||||
#: views.py:237
|
||||
#: views.py:240
|
||||
#, python-format
|
||||
msgid "No Page found matching the Path %s"
|
||||
msgstr "Keine Seite unter dem Pfad %s gefunden"
|
||||
|
||||
#: views.py:266
|
||||
#: views.py:269
|
||||
#, python-format
|
||||
msgid "No PDF Document found matching the Path %s"
|
||||
msgstr "Kein PDF Dokument unter dem Pfad %s gefunden."
|
||||
|
||||
@@ -216,7 +216,7 @@ class Page(models.Model):
|
||||
blank=True,
|
||||
null=True,
|
||||
related_name='subpages',
|
||||
on_delete=models.SET_NULL
|
||||
on_delete=models.CASCADE
|
||||
)
|
||||
position = models.PositiveSmallIntegerField(
|
||||
blank=True,
|
||||
|
||||
@@ -4,26 +4,19 @@ Created on 03.10.2011
|
||||
|
||||
@author: christian
|
||||
"""
|
||||
from django.conf.urls import url
|
||||
from django.urls import path
|
||||
|
||||
from .views import ArticleArchiveIndex, ArticleForm, ArticleYearArchive, \
|
||||
ArticleMonthArchive, ArticleDetail
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', ArticleArchiveIndex.as_view(), name='article-archive'),
|
||||
url(r'^add/$', ArticleForm.as_view(), name='add-article'),
|
||||
url(r'^edit/(?P<pk>[\d]+)/$', ArticleForm.as_view(), name='edit-article'),
|
||||
url(r'^(?P<year>[\d]{4})/$', ArticleYearArchive.as_view(),
|
||||
name='article-archive'),
|
||||
url(r'^(?P<year>[\d]{4})/(?P<month>[\d]+)/$', ArticleMonthArchive.as_view(),
|
||||
name='article-archive'),
|
||||
url(r'^(?P<year>[\d]{4})/(?P<month>[\d]+)/(?P<slug>[\-\d\w]+)/$',
|
||||
ArticleDetail.as_view(), name='show-article'),
|
||||
url(r'^(?P<category>[\-\d\w]+)/$', ArticleArchiveIndex.as_view(),
|
||||
name='article-archive'),
|
||||
url(r'^(?P<category>[\-\d\w]+)/(?P<year>[\d]{4})/$',
|
||||
ArticleYearArchive.as_view(), name='article-archive'),
|
||||
url(r'^(?P<category>[\-\d\w]+)/(?P<year>[\d]{4})/(?P<month>[\d]+)/$',
|
||||
ArticleMonthArchive.as_view(), name='article-archive'),
|
||||
path("", ArticleArchiveIndex.as_view(), name='article-archive'),
|
||||
path('add/', ArticleForm.as_view(), name='add-article'),
|
||||
path('edit/<int:pk>/', ArticleForm.as_view(), name='edit-article'),
|
||||
path('<int:year>/', ArticleYearArchive.as_view(), name='article-archive'),
|
||||
path('<int:year>/<int:month>/', ArticleMonthArchive.as_view(), name='article-archive'),
|
||||
path('<int:year>/<int:month>/<slug:slug>/', ArticleDetail.as_view(), name='show-article'),
|
||||
path('<slug:category>/', ArticleArchiveIndex.as_view(), name='article-archive'),
|
||||
path('<slug:category>/<int:year>/', ArticleYearArchive.as_view(), name='article-archive'),
|
||||
path('<slug:category>/<int:year>/<int:month>/', ArticleMonthArchive.as_view(), name='article-archive'),
|
||||
]
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
{% if not active_category %} class="active" {% endif %}>{% trans 'All Categories' %}</a></li>
|
||||
{% for category in categories %}
|
||||
<li><a href="{% url 'article-archive' category=category.slug %}"
|
||||
{% ifequal category.slug active_category.slug %} class="active"{% endifequal %}>{{ category.name }}</a></li>
|
||||
{% if category.slug == active_category.slug %} class="active"{% endif %}>{{ category.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user