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
bookshare
Commits
d44076dd
Commit
d44076dd
authored
Apr 29, 2015
by
Daniel W Bond
Browse files
cache added on pages, but at only six seconds
parent
54269475
Changes
2
Show whitespace changes
Inline
Side-by-side
bookshare/core/urls.py
View file @
d44076dd
# core django imports
from
django.conf.urls
import
patterns
,
url
from
django.views.decorators.cache
import
cache_page
# imports from your apps
from
.views
import
DetailStudent
,
StudentRatings
,
UpdateStudent
...
...
@@ -8,8 +9,8 @@ urlpatterns = patterns('',
UpdateStudent
.
as_view
(),
name
=
'name_change'
),
url
(
r
'^(?P<slug>[\w-]+)/$'
,
DetailStudent
.
as_view
(),
name
=
'profile'
),
cache_page
(
6
)(
DetailStudent
.
as_view
()
)
,
name
=
'profile'
),
url
(
r
'^(?P<slug>[\w-]+)/ratings/$'
,
StudentRatings
.
as_view
(),
name
=
'ratings'
),
cache_page
(
6
)(
StudentRatings
.
as_view
()
)
,
name
=
'ratings'
),
)
bookshare/trades/urls.py
View file @
d44076dd
...
...
@@ -16,7 +16,7 @@ urlpatterns = patterns('',
CreateListing
.
as_view
(),
name
=
'create_listing'
),
url
(
r
'^listing/(?P<slug>[\w-]+)/$'
,
ListingPage
.
as_view
(),
name
=
'detail_listing'
),
cache_page
(
6
)(
ListingPage
.
as_view
()
)
,
name
=
'detail_listing'
),
url
(
r
'^listing/(?P<slug>[\w-]+)/delete/$'
,
DeleteListing
.
as_view
(),
name
=
'delete_listing'
),
...
...
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