Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
9edc9e22
Commit
9edc9e22
authored
Feb 22, 2017
by
Grady Moran
Browse files
Added some comments, adjusted cacheing levels on some pages, fixed an ugly indent
(Closes
#39
)
parent
3637e5f0
Pipeline
#933
passed with stage
in 1 minute and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
go/settings/settings.py.template
View file @
9edc9e22
...
...
@@ -189,4 +189,4 @@ else:
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': '/var/run/redis/redis.sock',
},
}
}
go/settings/urls.py
View file @
9edc9e22
...
...
@@ -18,26 +18,26 @@ admin.autodiscover()
# Main list of project URL's
urlpatterns
=
[
# / - Homepage url.
url
(
r
'^$'
,
cache_page
(
4
)(
go
.
views
.
index
),
name
=
'index'
),
# / - Homepage url.
Cached for 1 second (this is the page you see after logging in, so having it show as not logged in is strange)
url
(
r
'^$'
,
cache_page
(
1
)(
go
.
views
.
index
),
name
=
'index'
),
# /view/<short> - View URL data.
# /view/<short> - View URL data.
Cached for 15 minutes
url
(
r
'^view/(?P<short>[-\w]+)$'
,
cache_page
(
60
*
15
)(
go
.
views
.
view
),
name
=
'view'
),
# /about - About page.
# /about - About page.
Cached for 15 minutes
url
(
r
'^about/?$'
,
cache_page
(
60
*
15
)(
TemplateView
.
as_view
(
template_name
=
'core/about.html'
)),
name
=
'about'
),
# /signup - Signup page for access.
url
(
r
'^signup/?$'
,
go
.
views
.
signup
,
name
=
'signup'
),
# /signup - Signup page for access.
Cached for 15 minutes
url
(
r
'^signup/?$'
,
cache_page
(
60
*
15
)(
go
.
views
.
signup
)
,
name
=
'signup'
),
# /myLinks - My-Links page, view and review links.
url
(
r
'^myLinks/?$'
,
cache_page
(
10
)(
go
.
views
.
my_links
),
name
=
'my_links'
),
# /myLinks - My-Links page, view and review links.
Cached for 5 seconds
url
(
r
'^myLinks/?$'
,
cache_page
(
5
)(
go
.
views
.
my_links
),
name
=
'my_links'
),
# /delete/<short> - Delete a link, no content display.
url
(
r
'^delete/(?P<short>[-\w]+)$'
,
go
.
views
.
delete
,
name
=
'delete'
),
# /registered - registration complete page
# /registered - registration complete page
. Cached for 15 minutes
url
(
r
'^registered/?$'
,
cache_page
(
60
*
15
)(
TemplateView
.
as_view
(
template_name
=
'registered.html'
)),
name
=
'registered'
),
...
...
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