Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
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-Alsijil
Commits
8e6c9320
Verified
Commit
8e6c9320
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Remove legacy caching methods
parent
4e460d55
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!90
Performance optimizations
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aleksis/apps/alsijil/forms.py
+0
-5
0 additions, 5 deletions
aleksis/apps/alsijil/forms.py
aleksis/apps/alsijil/model_extensions.py
+1
-1
1 addition, 1 deletion
aleksis/apps/alsijil/model_extensions.py
aleksis/apps/alsijil/models.py
+0
-11
0 additions, 11 deletions
aleksis/apps/alsijil/models.py
with
1 addition
and
17 deletions
aleksis/apps/alsijil/forms.py
+
0
−
5
View file @
8e6c9320
...
@@ -46,11 +46,6 @@ class PersonalNoteForm(forms.ModelForm):
...
@@ -46,11 +46,6 @@ class PersonalNoteForm(forms.ModelForm):
if
self
.
instance
and
getattr
(
self
.
instance
,
"
person
"
,
None
):
if
self
.
instance
and
getattr
(
self
.
instance
,
"
person
"
,
None
):
self
.
fields
[
"
person_name
"
].
initial
=
str
(
self
.
instance
.
person
)
self
.
fields
[
"
person_name
"
].
initial
=
str
(
self
.
instance
.
person
)
self
.
fields
[
"
extra_marks
"
].
choices
=
[(
e
.
id
,
str
(
e
))
for
e
in
ExtraMark
.
all
]
self
.
fields
[
"
excuse_type
"
].
choices
=
[(
None
,
"
-----
"
)]
+
[
(
e
.
id
,
str
(
e
))
for
e
in
ExcuseType
.
all
]
class
SelectForm
(
forms
.
Form
):
class
SelectForm
(
forms
.
Form
):
layout
=
Layout
(
Row
(
"
group
"
,
"
teacher
"
))
layout
=
Layout
(
Row
(
"
group
"
,
"
teacher
"
))
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/model_extensions.py
+
1
−
1
View file @
8e6c9320
...
@@ -245,7 +245,7 @@ def get_extra_marks(
...
@@ -245,7 +245,7 @@ def get_extra_marks(
week
=
self
.
week
week
=
self
.
week
stats
=
{}
stats
=
{}
for
extra_mark
in
ExtraMark
.
all
:
for
extra_mark
in
ExtraMark
.
objects
.
all
()
:
qs
=
self
.
personal_notes
.
filter
(
qs
=
self
.
personal_notes
.
filter
(
week
=
week
.
week
,
year
=
week
.
year
,
extra_marks
=
extra_mark
week
=
week
.
week
,
year
=
week
.
year
,
extra_marks
=
extra_mark
)
)
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/models.py
+
0
−
11
View file @
8e6c9320
...
@@ -36,12 +36,6 @@ class ExcuseType(ExtensibleModel):
...
@@ -36,12 +36,6 @@ class ExcuseType(ExtensibleModel):
def
count_label
(
self
):
def
count_label
(
self
):
return
f
"
{
self
.
short_name
}
_count
"
return
f
"
{
self
.
short_name
}
_count
"
@classproperty
@cache_memoize
(
3600
)
def
all
(
cls
):
qs
=
cls
.
objects
.
all
()
return
qs
class
Meta
:
class
Meta
:
ordering
=
[
"
name
"
]
ordering
=
[
"
name
"
]
verbose_name
=
_
(
"
Excuse type
"
)
verbose_name
=
_
(
"
Excuse type
"
)
...
@@ -215,11 +209,6 @@ class ExtraMark(ExtensibleModel):
...
@@ -215,11 +209,6 @@ class ExtraMark(ExtensibleModel):
def
count_label
(
self
):
def
count_label
(
self
):
return
f
"
{
self
.
short_name
}
_count
"
return
f
"
{
self
.
short_name
}
_count
"
@classproperty
@cache_memoize
(
3600
)
def
all
(
cls
):
return
cls
.
objects
.
all
()
class
Meta
:
class
Meta
:
ordering
=
[
"
short_name
"
]
ordering
=
[
"
short_name
"
]
verbose_name
=
_
(
"
Extra mark
"
)
verbose_name
=
_
(
"
Extra mark
"
)
...
...
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