Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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-Core
Commits
b85b29dd
Commit
b85b29dd
authored
5 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
fallback for classes
parent
26fd1d34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!86
Merge school-apps
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
schoolapps/timetable/models.py
+11
-4
11 additions, 4 deletions
schoolapps/timetable/models.py
with
11 additions
and
4 deletions
schoolapps/timetable/models.py
+
11
−
4
View file @
b85b29dd
...
...
@@ -7,11 +7,18 @@ from martor.models import MartorField
from
schoolapps.settings
import
BASE_DIR
from
timetable.m2l
import
convert_markdown_2_latex
from
untisconnect.api
import
get_all_classes
,
format_classes
from
untisconnect.models
import
Class
classes
=
get_all_classes
()
class_choices
=
[(
x
.
id
,
x
.
name
)
for
x
in
classes
]
from
untisconnect.models
import
Terms
try
:
from
untisconnect.api
import
get_all_classes
,
format_classes
from
untisconnect.models
import
Class
classes
=
get_all_classes
()
class_choices
=
[(
x
.
id
,
x
.
name
)
for
x
in
classes
]
except
Terms
.
DoesNotExist
:
classes
=
[]
class_choices
=
[]
class
HintClass
(
models
.
Model
):
...
...
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