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
93d9d74c
Commit
93d9d74c
authored
5 years ago
by
Jonathan Weth
Committed by
root
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into dev-1.0.1
parents
1a96747a
b0a6d636
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
biscuit/apps/chronos/settings.py
+12
-5
12 additions, 5 deletions
biscuit/apps/chronos/settings.py
biscuit/apps/chronos/urls.py
+3
-4
3 additions, 4 deletions
biscuit/apps/chronos/urls.py
with
15 additions
and
9 deletions
biscuit/apps/chronos/settings.py
+
12
−
5
View file @
93d9d74c
import
dbsettings
import
dbsettings
from
django
import
forms
from
django
import
forms
from
untisconnect.api_helper
import
get_terms
from
untisconnect.api_helper
import
get_terms
,
get_school_years
choices
=
[]
choices_school_years
=
[]
school_years
=
get_school_years
()
for
year
in
school_years
:
choices_school_years
.
append
((
year
.
id
,
year
.
name
))
choices_terms
=
[]
terms
=
get_terms
()
terms
=
get_terms
()
for
term
in
terms
:
for
term
in
terms
:
choices
.
append
((
term
.
id
,
term
.
name
))
choices
_terms
.
append
((
term
.
id
,
"
{}, #{}: {}
"
.
format
(
term
.
school_year_id
,
term
.
id
,
term
.
name
))
)
class
UNTISSettings
(
dbsettings
.
Group
):
class
UNTISSettings
(
dbsettings
.
Group
):
term
=
dbsettings
.
IntegerValue
(
widget
=
forms
.
Select
,
choices
=
choices
)
school_year
=
dbsettings
.
PositiveIntegerValue
(
"
Schuljahr
"
,
widget
=
forms
.
Select
,
choices
=
choices_school_years
)
term
=
dbsettings
.
IntegerValue
(
"
Periode
"
,
widget
=
forms
.
Select
,
choices
=
choices_terms
,
help_text
=
"
Bitte wähle oberhalb auch das zur Periode passende Schuljahr aus.
"
)
untis_settings
=
UNTISSettings
()
untis_settings
=
UNTISSettings
(
"
UNTIS
"
)
This diff is collapsed.
Click to expand it.
biscuit/apps/chronos/urls.py
+
3
−
4
View file @
93d9d74c
from
django.urls
import
path
from
django.urls
import
path
from
untisconnect.models
import
Terms
from
untisconnect.models
import
Terms
,
Schoolyear
try
:
try
:
from
.
import
views
from
.
import
views
...
@@ -25,7 +26,7 @@ try:
...
@@ -25,7 +26,7 @@ try:
path
(
'
<str:plan_date>-class.pdf
'
,
views
.
sub_pdf
,
name
=
"
timetable_substitutions_pdf_date
"
)
path
(
'
<str:plan_date>-class.pdf
'
,
views
.
sub_pdf
,
name
=
"
timetable_substitutions_pdf_date
"
)
]
]
except
Terms
.
DoesNotExist
:
except
(
Terms
.
DoesNotExist
,
Schoolyear
.
DoesNotExist
)
:
from
.
import
fallback_view
from
.
import
fallback_view
urlpatterns
=
[
urlpatterns
=
[
...
@@ -46,5 +47,3 @@ except Terms.DoesNotExist:
...
@@ -46,5 +47,3 @@ except Terms.DoesNotExist:
name
=
'
timetable_substitutions_date
'
),
name
=
'
timetable_substitutions_date
'
),
path
(
'
class.pdf
'
,
fallback_view
.
fallback
,
name
=
"
timetable_substitutions_pdf
"
)
path
(
'
class.pdf
'
,
fallback_view
.
fallback
,
name
=
"
timetable_substitutions_pdf
"
)
]
]
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