diff --git a/fet2020/authentications/urls.py b/fet2020/authentications/urls.py index 58b5496d..db1c9464 100644 --- a/fet2020/authentications/urls.py +++ b/fet2020/authentications/urls.py @@ -11,11 +11,11 @@ urlpatterns = [ path( "change-password/", views.LdapPasswordChangeView.as_view(), - name="change-password", + name="password_change", ), path( "change-password/done/", views.LdapPasswordChangeDoneView.as_view(), - name="password-change-done", + name="password_change_done", ), ] diff --git a/fet2020/authentications/views.py b/fet2020/authentications/views.py index e080158e..97d726dd 100644 --- a/fet2020/authentications/views.py +++ b/fet2020/authentications/views.py @@ -1,5 +1,9 @@ from django.contrib.auth import logout -from django.contrib.auth.views import LoginView, PasswordChangeDoneView, PasswordChangeView +from django.contrib.auth.views import ( + LoginView, + PasswordChangeDoneView, + PasswordChangeView, +) from django.shortcuts import redirect from documents.etherpadlib import del_ep_cookie @@ -9,6 +13,7 @@ from .forms import LdapPasswordChangeForm, LoginForm from django.urls import reverse_lazy, reverse + class AuthLoginView(LoginView): authentication_form = LoginForm redirect_authenticated_user = True @@ -31,7 +36,7 @@ def logoutUser(request): class LdapPasswordChangeView(PasswordChangeView): form_class = LdapPasswordChangeForm - success_url = reverse_lazy('authentications:password-change-done') + success_url = reverse_lazy("authentications:password_change_done") template_name = "authentications/change_password.html" diff --git a/fet2020/gallery/urls.py b/fet2020/gallery/urls.py index 55a1a3bd..d99322c5 100644 --- a/fet2020/gallery/urls.py +++ b/fet2020/gallery/urls.py @@ -8,5 +8,5 @@ app_name = apps.GalleryConfig.name urlpatterns = [ path("", views.index, name="index"), path("/", views.show_album, name="album"), - path("draft//", views.show_draft_album, name="draft-album"), + path("draft//", views.show_draft_album, name="album_draft"), ] diff --git a/fet2020/intern/urls.py b/fet2020/intern/urls.py index 649fa21a..30c28da4 100644 --- a/fet2020/intern/urls.py +++ b/fet2020/intern/urls.py @@ -26,17 +26,17 @@ attachment_urlpatterns = [ path( "update/", AttachmentUpdateView.as_view(), - name="attachment-update", + name="attachment_update", ), path( - "etherpad-create/", + "create-etherpad/", EtherpadCreateView.as_view(), - name="etherpad-create", + name="etherpad_create", ), path( - "file-create/", + "create-file/", FileUploadCreateView.as_view(), - name="file-create", + name="file_create", ), ] @@ -45,22 +45,22 @@ topic_urlpatterns = [ path( "update/", TopicUpdateView.as_view(), - name="topic-update", + name="topic_update", ), path( - "attachment-create/", + "create-attachment/", AttachmentCreateView.as_view(), - name="attachment-create", + name="attachment_create", ), - path("create/", TaskCreateView.as_view(), name="task-create"), + path("create-task/", TaskCreateView.as_view(), name="task_create"), ] urlpatterns = [ path("", views.index, name="index"), path( - "/topic-create/", + "/create-topic/", TopicCreateView.as_view(), - name="topic-create", + name="topic_create", ), path("//", include(topic_urlpatterns)), path( diff --git a/fet2020/posts/models.py b/fet2020/posts/models.py index c0719d22..5276fc4c 100644 --- a/fet2020/posts/models.py +++ b/fet2020/posts/models.py @@ -138,7 +138,7 @@ class Post(models.Model): ) def get_absolute_url(self): - return reverse("posts:post-detail", kwargs={"slug": self.slug}) + return reverse("posts:post", kwargs={"slug": self.slug}) def save(self, *args, **kwargs): # save the post with some defaults diff --git a/fet2020/posts/urls.py b/fet2020/posts/urls.py index 5a5a95d7..4d9a6139 100644 --- a/fet2020/posts/urls.py +++ b/fet2020/posts/urls.py @@ -11,12 +11,12 @@ urlpatterns = [ # fet calendar (path have to be ahead show) path("fet_calendar.ics", views.calendar, name="calendar"), path( - "fetmeeting-create/", + "create-fetmeeting/", views.FetMeetingCreateView.as_view(), - name="fetmeeting-create", + name="fetmeeting_create", ), - path("/", views.PostDetailView.as_view(), name="post-detail"), - path("/update/", views.PostUpdateView.as_view(), name="post-update"), + path("/", views.PostDetailView.as_view(), name="post"), + path("/update/", views.PostUpdateView.as_view(), name="post_update"), re_path( r"^(?P[-\w]+)/agenda.pdf$", views.show_pdf_agenda, diff --git a/fet2020/tasks/models.py b/fet2020/tasks/models.py index 8f30c8ce..680ada98 100644 --- a/fet2020/tasks/models.py +++ b/fet2020/tasks/models.py @@ -91,7 +91,7 @@ class Task(models.Model): return self.title def get_absolute_url(self): - return reverse("tasks:task-detail", kwargs={"slug": self.slug}) + return reverse("tasks:task", kwargs={"slug": self.slug}) def save(self, *args, **kwargs): if not self.slug: diff --git a/fet2020/tasks/urls.py b/fet2020/tasks/urls.py index 50662bb2..b7beb12f 100644 --- a/fet2020/tasks/urls.py +++ b/fet2020/tasks/urls.py @@ -9,8 +9,10 @@ app_name = apps.TasksConfig.name urlpatterns = [ path("", views.index, name="index"), - path("add/", TaskCreateView.as_view(), name="task-create"), - path("/", TaskDetailView.as_view(), name="task-detail"), - path("/update/", TaskUpdateView.as_view(), name="task-update"), - path("/add/", DocumentCreateView.as_view(), name="docu-create"), + path("create-task/", TaskCreateView.as_view(), name="task_create"), + path("/", TaskDetailView.as_view(), name="task"), + path("/update/", TaskUpdateView.as_view(), name="task_update"), + path( + "/create-document/", DocumentCreateView.as_view(), name="docu_create" + ), ] diff --git a/fet2020/tasks/views.py b/fet2020/tasks/views.py index 13f08817..c7a04c61 100644 --- a/fet2020/tasks/views.py +++ b/fet2020/tasks/views.py @@ -146,4 +146,4 @@ class DocumentCreateView(LoginRequiredMixin, CreateView): return context def get_success_url(self): - return reverse("tasks:task-detail", kwargs=self.kwargs) + return reverse("tasks:task", kwargs=self.kwargs) diff --git a/fet2020/templates/authentications/change_password.html b/fet2020/templates/authentications/change_password.html index c4e816ff..b60cd7bd 100644 --- a/fet2020/templates/authentications/change_password.html +++ b/fet2020/templates/authentications/change_password.html @@ -13,7 +13,7 @@
-
+ {% csrf_token %} {% include "baseform/non_field_errors.html" %} diff --git a/fet2020/templates/gallery/index.html b/fet2020/templates/gallery/index.html index 2bd4ae93..2982fed5 100644 --- a/fet2020/templates/gallery/index.html +++ b/fet2020/templates/gallery/index.html @@ -16,7 +16,7 @@
{% for album in albums %} {% if request.user.is_authenticated and album.status == album.DRAFT %} - +

{{ album.title }}

{{ album.event_date }}

diff --git a/fet2020/templates/home.html b/fet2020/templates/home.html index bea49a5b..06a4ff66 100644 --- a/fet2020/templates/home.html +++ b/fet2020/templates/home.html @@ -37,7 +37,7 @@
{% endblock %} diff --git a/fet2020/templates/intern/index.html b/fet2020/templates/intern/index.html index 758a8504..06df1958 100644 --- a/fet2020/templates/intern/index.html +++ b/fet2020/templates/intern/index.html @@ -25,14 +25,14 @@ x-transition:leave="transition ease-in duration-150" x-transition:leave-start="transform origin-top opacity-100 translate-x-0" x-transition:leave-end="transform origin-top opacity-0 -translate-x-6" - >Eintrag hinzufügen + >Eintrag hinzufügen
  • - + Eintrag hinzufügen
  • diff --git a/fet2020/templates/intern/topic/topic_detail.html b/fet2020/templates/intern/topic/topic_detail.html index 1ae8d535..3c0f0153 100644 --- a/fet2020/templates/intern/topic/topic_detail.html +++ b/fet2020/templates/intern/topic/topic_detail.html @@ -24,7 +24,7 @@
      {% for task in tasks %}
    • - {{ task.title|truncatechars:45 }} Link + {{ task.title|truncatechars:45 }} Link
    • {% endfor %}
    @@ -36,16 +36,16 @@ {% endfor %}
  • - + Eintrag hinzufügen
- Thema bearbeiten + Thema bearbeiten {% if topic.task_list %} - Task hinzufügen + Task hinzufügen {% endif %}
diff --git a/fet2020/templates/posts/event/detail.html b/fet2020/templates/posts/event/detail.html index d4739670..1f569721 100644 --- a/fet2020/templates/posts/event/detail.html +++ b/fet2020/templates/posts/event/detail.html @@ -12,7 +12,7 @@ {% block update_button_desktop %} {% if request.user.is_authenticated %} - {% endif %} @@ -100,7 +100,7 @@ {% block update_button_mobile %} {% if request.user.is_authenticated %} - + Event bearbeiten {% endif %} diff --git a/fet2020/templates/posts/fetmeeting/detail.html b/fet2020/templates/posts/fetmeeting/detail.html index ac6a759e..be537364 100644 --- a/fet2020/templates/posts/fetmeeting/detail.html +++ b/fet2020/templates/posts/fetmeeting/detail.html @@ -12,7 +12,7 @@ {% block update_button_desktop %} {% if request.user.is_authenticated %} - {% endif %} @@ -215,7 +215,7 @@ {% block update_button_mobile %} {% if request.user.is_authenticated %} - + FET Sitzung bearbeiten {% endif %} diff --git a/fet2020/templates/posts/news/detail.html b/fet2020/templates/posts/news/detail.html index 784635fa..e1e9ee8e 100644 --- a/fet2020/templates/posts/news/detail.html +++ b/fet2020/templates/posts/news/detail.html @@ -6,7 +6,7 @@ {% block update_button_desktop %} {% if request.user.is_authenticated %} - {% endif %} @@ -55,7 +55,7 @@ {% block update_button_mobile %} {% if request.user.is_authenticated %} - + Artikel bearbeiten {% endif %} diff --git a/fet2020/templates/posts/show.html b/fet2020/templates/posts/show.html index 202f882b..794dfa24 100644 --- a/fet2020/templates/posts/show.html +++ b/fet2020/templates/posts/show.html @@ -12,7 +12,7 @@ {% block content %}
- -
+ {% block prev_text %}Vorheriger Artikel{% endblock %} - + {% block next_text %}Nächster Artikel{% endblock %} diff --git a/fet2020/templates/tasks/index.html b/fet2020/templates/tasks/index.html index d5c52944..8c97c9ff 100644 --- a/fet2020/templates/tasks/index.html +++ b/fet2020/templates/tasks/index.html @@ -95,7 +95,7 @@
{% endblock %}