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
9f1250dd
Commit
9f1250dd
authored
4 years ago
by
Hangzhi Yu
Browse files
Options
Downloads
Patches
Plain Diff
Add never_cache decorator
parent
9a4a180d
Loading
Loading
1 merge request
!116
Resolve "Add never_cache decorators"
Pipeline
#5063
passed
4 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/chronos/views.py
+2
-0
2 additions, 0 deletions
aleksis/apps/chronos/views.py
with
2 additions
and
0 deletions
aleksis/apps/chronos/views.py
+
2
−
0
View file @
9f1250dd
...
...
@@ -7,6 +7,7 @@ from django.shortcuts import get_object_or_404, redirect, render
from
django.urls
import
reverse
from
django.utils
import
timezone
from
django.utils.translation
import
ugettext
as
_
from
django.views.decorators.cache
import
never_cache
from
django_tables2
import
RequestConfig
from
rules.contrib.views
import
permission_required
...
...
@@ -214,6 +215,7 @@ def lessons_day(
return
render
(
request
,
"
chronos/lessons_day.html
"
,
context
)
@never_cache
@permission_required
(
"
chronos.edit_substitution
"
,
fn
=
get_substitution_by_id
)
def
edit_substitution
(
request
:
HttpRequest
,
id_
:
int
,
week
:
int
)
->
HttpResponse
:
"""
View a form to edit a substitution lessen.
"""
...
...
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