Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
21b3e3b3
Commit
21b3e3b3
authored
5 years ago
by
Parbhat Puri
Browse files
Options
Downloads
Patches
Plain Diff
Never cache public form pages as they contain CSRF tokens
parent
2c8c3de9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentech/public/forms/models.py
+3
-0
3 additions, 0 deletions
opentech/public/forms/models.py
with
3 additions
and
0 deletions
opentech/public/forms/models.py
+
3
−
0
View file @
21b3e3b3
...
...
@@ -6,7 +6,9 @@ from django.core.serializers.json import DjangoJSONEncoder
from
django.conf
import
settings
from
django.db
import
models
from
django.forms
import
FileField
from
django.utils.decorators
import
method_decorator
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.views.decorators.cache
import
never_cache
from
modelcluster.fields
import
ParentalKey
...
...
@@ -40,6 +42,7 @@ class ExtendedFormBuilder(FormBuilder):
return
FileField
(
**
options
)
@method_decorator
(
never_cache
,
name
=
'
serve
'
)
class
FormPage
(
AbstractEmailForm
,
BasePage
):
form_builder
=
ExtendedFormBuilder
subpage_types
=
[]
...
...
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