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

Add virtual foreign key to subject on group model

parent b081e4d3
No related branches found
No related tags found
1 merge request!65Resolve "Add option to link subjects to groups"
Pipeline #2863 passed
......@@ -7,7 +7,7 @@ from jsonstore import BooleanField
from aleksis.core.models import Announcement, Group, Person
from .managers import TimetableType
from .models import Lesson, LessonPeriod
from .models import Lesson, LessonPeriod, Subject
@Person.property_
......@@ -88,3 +88,5 @@ Announcement.class_method(for_timetables)
Announcement.field(
show_in_timetables=BooleanField(verbose_name=_("Show announcement in timetable views?"))
)
Group.foreign_key("subject", Subject, related_name="groups")
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