Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Untis
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-Untis
Commits
8c1f5754
Project 'AlekSIS/onboarding/AlekSIS-App-Kolego' was moved to 'AlekSIS/official/AlekSIS-App-Kolego'. Please update any links and bookmarks that may still have the old path.
Commit
8c1f5754
authored
6 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Unstable
parent
64a2d5a4
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/untis/api.py
+26
-0
26 additions, 0 deletions
biscuit/apps/untis/api.py
with
26 additions
and
0 deletions
biscuit/apps/untis/api.py
+
26
−
0
View file @
8c1f5754
...
...
@@ -204,3 +204,29 @@ def get_subject_by_id(id):
##########
def
get_raw_lessons
():
return
run_all
(
models
.
Lesson
.
objects
)
########
# TERM #
########
class
Term
(
object
):
def
__init__
(
self
):
self
.
filled
=
False
self
.
id
=
None
self
.
name
=
None
def
create
(
self
,
db_obj
):
self
.
filled
=
True
self
.
id
=
db_obj
.
term_id
self
.
name
=
db_obj
.
longname
def
get_terms
():
data
=
run_using
(
models
.
Terms
.
objects
).
all
()
terms
=
[]
for
item
in
data
:
term
=
Term
()
term
.
create
(
item
)
terms
.
append
(
term
)
print
(
term
.
name
)
return
terms
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