Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Chronos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Chronos
Commits
fea3df18
Unverified
Commit
fea3df18
authored
5 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Re-order models.
parent
eb2a11bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biscuit/apps/chronos/models.py
+14
-15
14 additions, 15 deletions
biscuit/apps/chronos/models.py
with
14 additions
and
15 deletions
biscuit/apps/chronos/models.py
+
14
−
15
View file @
fea3df18
...
...
@@ -82,6 +82,20 @@ class Lesson(models.Model):
date_end
=
models
.
DateField
(
verbose_name
=
_
(
'
Effective end date of lesson
'
),
null
=
True
)
class
LessonSubstitution
(
models
.
Model
):
week
=
models
.
IntegerField
(
verbose_name
=
_
(
'
Kalenderwoche
'
),
default
=
current_week
)
lesson_period
=
models
.
ForeignKey
(
'
LessonPeriod
'
,
models
.
CASCADE
,
'
substitutions
'
)
subject
=
models
.
ForeignKey
(
'
Subject
'
,
on_delete
=
models
.
CASCADE
,
related_name
=
'
lesson_substitutions
'
,
null
=
True
)
teachers
=
models
.
ManyToManyField
(
'
core.Person
'
,
related_name
=
'
lesson_substitutions
'
)
room
=
models
.
ForeignKey
(
'
Room
'
,
models
.
CASCADE
,
null
=
True
)
class
LessonPeriod
(
models
.
Model
):
lesson
=
models
.
ForeignKey
(
'
Lesson
'
,
models
.
CASCADE
)
...
...
@@ -113,18 +127,3 @@ class LessonPeriod(models.Model):
def
get_groups
(
self
)
->
models
.
query
.
QuerySet
:
return
self
.
lesson
.
groups
class
LessonSubstitution
(
models
.
Model
):
week
=
models
.
IntegerField
(
verbose_name
=
_
(
'
Kalenderwoche
'
),
default
=
current_week
)
lesson_period
=
models
.
ForeignKey
(
'
LessonPeriod
'
,
models
.
CASCADE
,
'
substitutions
'
)
subject
=
models
.
ForeignKey
(
'
Subject
'
,
on_delete
=
models
.
CASCADE
,
related_name
=
'
lesson_substitutions
'
,
null
=
True
)
teachers
=
models
.
ManyToManyField
(
'
core.Person
'
,
related_name
=
'
lesson_substitutions
'
)
room
=
models
.
ForeignKey
(
'
Room
'
,
models
.
CASCADE
,
null
=
True
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment