Skip to content
Snippets Groups Projects
Verified Commit 256411dd authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Rename properties and views with unfortunate namings

parent 62b2f671
No related branches found
No related tags found
No related merge requests found
......@@ -345,7 +345,7 @@ class LessonSubstitution(models.Model):
raise ValidationError(_("Lessons can only be either substituted or cancelled."))
@property
def type(self):
def type_(self):
# TODO: Add cases events and supervisions
if self.cancelled:
return "cancellation"
......
......@@ -80,7 +80,7 @@
</td>
{% endif %}
{% for sub in substitutions %}
<tr class="{% if sub.type == "cancellation" %}green-text{% else %}black-text{% endif %}"> {# TODO: Extend support for blue and purple (supervisions and events) #}
<tr class="{% if sub.type_ == "cancellation" %}green-text{% else %}black-text{% endif %}"> {# TODO: Extend support for blue and purple (supervisions and events) #}
<td>
{% include "chronos/partials/groups.html" with groups=sub.lesson_period.lesson.groups.all %}
</td>
......
......@@ -3,7 +3,7 @@ from django.urls import path
from . import views
urlpatterns = [
path("", views.all, name="all_timetables"),
path("", views.all_timetables, name="all_timetables"),
path("timetable/my/", views.my_timetable, name="my_timetable"),
path("timetable/my/<int:year>/<int:month>/<int:day>/", views.my_timetable, name="my_timetable_by_date"),
path("timetable/<str:type_>/<int:pk>/", views.timetable, name="timetable"),
......
......@@ -28,7 +28,7 @@ from .util.weeks import CalendarWeek, get_weeks_for_year
@login_required
def all(request: HttpRequest) -> HttpResponse:
def all_timetables(request: HttpRequest) -> HttpResponse:
context = {}
teachers = Person.objects.annotate(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment