Commit 172661ea authored by Daniel W Bond's avatar Daniel W Bond
Browse files

fixes the 'see other people's username in the navbar' problem

parent 215124c3
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
{% block title %} SRCT Roomlist | Majors | {{ major.name }} {% endblock title %} {% block title %} SRCT Roomlist | Majors | {{ major.name }} {% endblock title %}
{% block content %} {% block content %}
{% load cache %}
{% cache 900 list_majors %}
<div class="page-header" id="banner"> <div class="page-header" id="banner">
<div class="row"> <div class="row">
...@@ -47,4 +49,5 @@ ...@@ -47,4 +49,5 @@
</div> </div>
</div> </div>
{% endcache %}
{% endblock content %} {% endblock content %}
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
from __future__ import absolute_import, print_function from __future__ import absolute_import, print_function
# core django imports # core django imports
from django.conf.urls import patterns, include, url from django.conf.urls import patterns, include, url
from django.views.decorators.cache import cache_page
# imports from your apps # imports from your apps
from .views import (DetailStudent, UpdateStudent, DetailStudentSettings, from .views import (DetailStudent, UpdateStudent, DetailStudentSettings,
DetailCurrentStudent, DetailCurrentStudentSettings, ListMajors, DetailCurrentStudent, DetailCurrentStudentSettings, ListMajors,
...@@ -17,9 +16,7 @@ urlpatterns = patterns('', ...@@ -17,9 +16,7 @@ urlpatterns = patterns('',
url(r'', include('allauth.urls')), url(r'', include('allauth.urls')),
# majors pages # majors pages
url(r'^majors/$', url(r'^majors/$', ListMajors.as_view(), name='list_majors'),
cache_page(60 * 15)(ListMajors.as_view()),
name='list_majors'),
url(r'^majors/(?P<slug>[\w-]+)/(?P<major>[\w-]+)/$', url(r'^majors/(?P<slug>[\w-]+)/(?P<major>[\w-]+)/$',
DetailMajor.as_view(), name='detail_major'), DetailMajor.as_view(), name='detail_major'),
...@@ -34,8 +31,7 @@ urlpatterns = patterns('', ...@@ -34,8 +31,7 @@ urlpatterns = patterns('',
# student settings # student settings
url(r'^student/(?P<slug>[\w-]+)/settings/$', url(r'^student/(?P<slug>[\w-]+)/settings/$',
cache_page(4)(UpdateStudent.as_view()), UpdateStudent.as_view(), name='updateStudent'),
name='updateStudent'),
url(r'^student/(?P<slug>[\w-]+)/settings/social/remove/$', url(r'^student/(?P<slug>[\w-]+)/settings/social/remove/$',
RemoveSocialConfirmationView.as_view(), RemoveSocialConfirmationView.as_view(),
......
{% extends 'layouts/base.html' %} {% extends 'layouts/base.html' %}
{% block title %} SRCT Roomlist &bull; {{ building.name }} {% endblock %} {% block title %} SRCT Roomlist &bull; {{ building.name }} {% endblock %}
{% block content %} {% block content %}
{% load cache %}
{% cache 900 detail_building building %}
<div class="page-header" id="banner"> <div class="page-header" id="banner">
<div class="row"> <div class="row">
...@@ -33,4 +35,5 @@ ...@@ -33,4 +35,5 @@
{% endfor %} {% endfor %}
</div> </div>
{% endcache %}
{% endblock %} {% endblock %}
{% extends 'layouts/base.html' %} {% extends 'layouts/base.html' %}
{% block title %} SRCT RoomList &bull; Neighborhoods {% endblock title %} {% block title %} SRCT Roomlist &bull; Neighborhoods {% endblock title %}
{% block content %} {% block content %}
{% load cache %}
{% cache 900 list_buildings %}
<div class="page-header" id="banner"> <div class="page-header" id="banner">
<div class="row"> <div class="row">
...@@ -77,4 +79,5 @@ ...@@ -77,4 +79,5 @@
</div> </div>
</div> </div>
{% endcache %}
{% endblock %} {% endblock %}
...@@ -2,18 +2,16 @@ ...@@ -2,18 +2,16 @@
from __future__ import absolute_import, print_function from __future__ import absolute_import, print_function
# core django imports # core django imports
from django.conf.urls import patterns, url from django.conf.urls import patterns, url
from django.views.decorators.cache import cache_page
# imports from your apps # imports from your apps
from .views import ListBuildings, DetailBuilding, DetailFloor, DetailRoom from .views import ListBuildings, DetailBuilding, DetailFloor, DetailRoom
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'^$', cache_page(60 * 15)(ListBuildings.as_view()), name='list_buildings'), url(r'^$', ListBuildings.as_view(), name='list_buildings'),
url(r'^(?P<slug>[\w-]+)/(?P<building>[\w-]+)/$', url(r'^(?P<slug>[\w-]+)/(?P<building>[\w-]+)/$',
cache_page(60 * 15)(DetailBuilding.as_view()), DetailBuilding.as_view(), name='detail_building'),
name='detail_building'),
url(r'^(?P<slug>[\w-]+)/(?P<building>[\w-]+)/(?P<floor>[\w-]+)/$', url(r'^(?P<slug>[\w-]+)/(?P<building>[\w-]+)/(?P<floor>[\w-]+)/$',
DetailFloor.as_view(), name='detail_floor'), DetailFloor.as_view(), name='detail_floor'),
......
...@@ -5,7 +5,6 @@ from django.conf.urls import patterns, include, url ...@@ -5,7 +5,6 @@ from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView from django.views.generic import TemplateView
from django.contrib import admin from django.contrib import admin
from django.views.decorators.cache import cache_page
# imports from your apps # imports from your apps
from .views import HomePageView from .views import HomePageView
from haystack.views import SearchView from haystack.views import SearchView
...@@ -20,12 +19,8 @@ urlpatterns = patterns('', ...@@ -20,12 +19,8 @@ urlpatterns = patterns('',
# project-level urls # project-level urls
url(r'^$', HomePageView.as_view(), name='homepage'), url(r'^$', HomePageView.as_view(), name='homepage'),
url(r'^about/$', url(r'^about/$', TemplateView.as_view(template_name='about.html'), name='about'),
cache_page(60 * 15)(TemplateView.as_view(template_name='about.html')), url(r'^privacy/$', TemplateView.as_view(template_name='privacy.html'), name='privacy'),
name='about'),
url(r'^privacy/$',
cache_page(60 * 15)(TemplateView.as_view(template_name='privacy.html')),
name='privacy'),
# app-level urls # app-level urls
url(r'^housing/', include('housing.urls')), url(r'^housing/', include('housing.urls')),
......
...@@ -6,6 +6,9 @@ SRCT Roomlist &bull; About ...@@ -6,6 +6,9 @@ SRCT Roomlist &bull; About
{% block content %} {% block content %}
{% load cache %}
{% cache 900 about %}
<div class="container container-padding"> <div class="container container-padding">
<div class="row"> <div class="row">
<div class="col-lg-12 license"> <div class="col-lg-12 license">
...@@ -88,4 +91,5 @@ SRCT Roomlist &bull; About ...@@ -88,4 +91,5 @@ SRCT Roomlist &bull; About
</div> </div>
</div> </div>
{% endcache %}
{% endblock %} {% endblock %}
...@@ -5,6 +5,8 @@ SRCT Roomlist &bull; Privacy Policy ...@@ -5,6 +5,8 @@ SRCT Roomlist &bull; Privacy Policy
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% load cache %}
{% cache 900 privacy %}
<div class="page-header" id="banner"> <div class="page-header" id="banner">
<div class="row"> <div class="row">
...@@ -171,4 +173,5 @@ SRCT Roomlist &bull; Privacy Policy ...@@ -171,4 +173,5 @@ SRCT Roomlist &bull; Privacy Policy
</div> </div>
</div> </div>
{% endcache %}
{% endblock %} {% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment