Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Paweljong
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
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
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
Teckids
Projekt Hack-n-Fun
AlekSIS-App-Paweljong
Commits
68b2816c
Commit
68b2816c
authored
3 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Add templatetag for process bars
parent
0c35eb94
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Reformat and cleanup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/paweljong/templatetags/coerce.py
+13
-0
13 additions, 0 deletions
aleksis/apps/paweljong/templatetags/coerce.py
with
13 additions
and
0 deletions
aleksis/apps/paweljong/templatetags/coerce.py
0 → 100644
+
13
−
0
View file @
68b2816c
from
django
import
template
register
=
template
.
Library
()
@register.filter
def
coerce_max
(
value
,
arg
):
return
arg
if
value
>
arg
else
value
@register.filter
def
coerce_min
(
value
,
arg
):
return
arg
if
value
<
arg
else
value
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