Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
13f41449
Commit
13f41449
authored
Apr 29, 2018
by
Pietro Albini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable caching for most of the download pages
parent
83e39e9f
Pipeline
#65
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
uitwww/cache.py
uitwww/cache.py
+1
-1
uitwww/download.py
uitwww/download.py
+3
-0
No files found.
uitwww/cache.py
View file @
13f41449
...
@@ -68,7 +68,7 @@ def after_request(response):
...
@@ -68,7 +68,7 @@ def after_request(response):
# Do dome filtering
# Do dome filtering
if
status
!=
200
or
method
!=
"GET"
:
if
status
!=
200
or
method
!=
"GET"
:
return
res
ult
return
res
ponse
if
url
.
endswith
(
"/"
):
if
url
.
endswith
(
"/"
):
url
+=
"index.html"
url
+=
"index.html"
...
...
uitwww/download.py
View file @
13f41449
...
@@ -26,6 +26,7 @@ import itsdangerous
...
@@ -26,6 +26,7 @@ import itsdangerous
import
requests
import
requests
import
pkg_resources
import
pkg_resources
from
.
import
cache
from
.
import
launchpad
from
.
import
launchpad
...
@@ -218,6 +219,7 @@ class Downloads:
...
@@ -218,6 +219,7 @@ class Downloads:
bp
=
flask
.
Blueprint
(
"download"
,
__name__
)
bp
=
flask
.
Blueprint
(
"download"
,
__name__
)
@
bp
.
route
(
"/"
)
@
bp
.
route
(
"/"
)
@
cache
.
enable
def
index
():
def
index
():
return
flask
.
render_template
(
return
flask
.
render_template
(
"download/index.html"
,
"download/index.html"
,
...
@@ -225,6 +227,7 @@ class Downloads:
...
@@ -225,6 +227,7 @@ class Downloads:
)
)
@
bp
.
route
(
"/<distro>"
)
@
bp
.
route
(
"/<distro>"
)
@
cache
.
enable
def
landing
(
distro
):
def
landing
(
distro
):
if
distro
not
in
self
.
config
[
"distros"
]:
if
distro
not
in
self
.
config
[
"distros"
]:
flask
.
abort
(
404
)
flask
.
abort
(
404
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment