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
roomlist
Commits
b17de2c7
Commit
b17de2c7
authored
Dec 29, 2015
by
Daniel W Bond
Browse files
Merge branch 'master' of git.gmu.edu:srct/roomlist into querysets
parents
c033a177
bdd01530
Changes
15
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/templates/detail_major.html
View file @
b17de2c7
...
...
@@ -2,7 +2,7 @@
{% block title %} SRCT Roomlist | Majors | {{ major.name }} {% endblock title %}
{% block content %}
{% load cache %}
{% cache 1
20
major_students request.user.username major %}
{% cache 1
5
major_students request.user.username major %}
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
...
...
roomlist/accounts/templates/list_majors.html
View file @
b17de2c7
...
...
@@ -3,6 +3,8 @@
{% block title %} SRCT Roomlist | Majors | {{ major.name }} {% endblock title %}
{% block content %}
{% load cache %}
{% cache 900 list_majors %}
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
...
...
@@ -47,4 +49,5 @@
</div>
</div>
{% endcache %}
{% endblock content %}
roomlist/accounts/templates/updateStudent.html
View file @
b17de2c7
...
...
@@ -6,6 +6,8 @@
{% endblock %}
{% block content %}
{% load cache %}
{% cache 4 student_update request.user.username %}
{% include 'room_change_warning.html' %}
...
...
@@ -161,7 +163,7 @@
</div>
</div>
{% endcache %}
{% endblock content %}
{% block javascript %}
...
...
roomlist/accounts/urls.py
View file @
b17de2c7
...
...
@@ -2,7 +2,6 @@
from
__future__
import
absolute_import
,
print_function
# core django imports
from
django.conf.urls
import
patterns
,
include
,
url
from
django.views.decorators.cache
import
cache_page
# imports from your apps
from
.views
import
(
DetailStudent
,
UpdateStudent
,
DetailStudentSettings
,
DetailCurrentStudent
,
DetailCurrentStudentSettings
,
ListMajors
,
...
...
@@ -17,9 +16,7 @@ urlpatterns = patterns('',
url
(
r
''
,
include
(
'allauth.urls'
)),
# majors pages
url
(
r
'^majors/$'
,
cache_page
(
60
*
15
)(
ListMajors
.
as_view
()),
name
=
'list_majors'
),
url
(
r
'^majors/$'
,
ListMajors
.
as_view
(),
name
=
'list_majors'
),
url
(
r
'^majors/(?P<slug>[\w-]+)/(?P<major>[\w-]+)/$'
,
DetailMajor
.
as_view
(),
name
=
'detail_major'
),
...
...
@@ -34,8 +31,7 @@ urlpatterns = patterns('',
# student settings
url
(
r
'^student/(?P<slug>[\w-]+)/settings/$'
,
cache_page
(
4
)(
UpdateStudent
.
as_view
()),
name
=
'updateStudent'
),
UpdateStudent
.
as_view
(),
name
=
'updateStudent'
),
url
(
r
'^student/(?P<slug>[\w-]+)/settings/social/remove/$'
,
RemoveSocialConfirmationView
.
as_view
(),
...
...
roomlist/housing/buildingFloors.txt
View file @
b17de2c7
...
...
@@ -108,7 +108,6 @@ Potomac Heights
4
5
Blue Ridge
1
2
3
4
...
...
@@ -120,7 +119,6 @@ Northern Neck
4
5
Sandbridge
1
2
3
4
...
...
roomlist/housing/templates/detail_building.html
View file @
b17de2c7
{% extends 'layouts/base.html' %}
{% block title %} SRCT Roomlist
•
{{ building.name }} {% endblock %}
{% block content %}
{% load cache %}
{% cache 900 detail_building building %}
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
...
...
@@ -33,4 +35,5 @@
{% endfor %}
</div>
{% endcache %}
{% endblock %}
roomlist/housing/templates/detail_floor.html
View file @
b17de2c7
...
...
@@ -3,7 +3,7 @@
{% block title %} SRCT Roomlist
•
{{ floor.building.name }} {{ floor.number|ordinal }}{% endblock title %}
{% block content %}
{% load cache %}
{% cache 1
20
floor_students request.user.username floor %}
{% cache 1
5
floor_students request.user.username floor %}
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
...
...
roomlist/housing/templates/detail_room.html
View file @
b17de2c7
...
...
@@ -2,7 +2,7 @@
{% block title %} SRCT Roomlist
•
{{ room.floor.building.name }} {{ room.number }}{% endblock %}
{% block content %}
{% load cache %}
{% cache 1
20
room_students request.user.username room %}
{% cache 1
5
room_students request.user.username room %}
{% load humanize %}
<div
class=
"page-header"
id=
"banner"
>
...
...
roomlist/housing/templates/list_buildings.html
View file @
b17de2c7
{% extends 'layouts/base.html' %}
{% block title %} SRCT Room
L
ist
•
Neighborhoods {% endblock title %}
{% block title %} SRCT Room
l
ist
•
Neighborhoods {% endblock title %}
{% block content %}
{% load cache %}
{% cache 900 list_buildings %}
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
...
...
@@ -77,4 +79,5 @@
</div>
</div>
{% endcache %}
{% endblock %}
roomlist/housing/urls.py
View file @
b17de2c7
...
...
@@ -2,18 +2,16 @@
from
__future__
import
absolute_import
,
print_function
# 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
ListBuildings
,
DetailBuilding
,
DetailFloor
,
DetailRoom
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-]+)/$'
,
cache_page
(
60
*
15
)(
DetailBuilding
.
as_view
()),
name
=
'detail_building'
),
DetailBuilding
.
as_view
(),
name
=
'detail_building'
),
url
(
r
'^(?P<slug>[\w-]+)/(?P<building>[\w-]+)/(?P<floor>[\w-]+)/$'
,
DetailFloor
.
as_view
(),
name
=
'detail_floor'
),
...
...
roomlist/settings/settings.py
View file @
b17de2c7
...
...
@@ -206,6 +206,7 @@ else:
CACHES
=
{
'default'
:
{
'BACKEND'
:
'redis_cache.RedisCache'
,
# configure to redis port
'LOCATION'
:
'/var/run/redis/redis.sock'
,
},
}
...
...
@@ -232,12 +233,20 @@ if not DEBUG:
'disable_existing_loggers'
:
False
,
'handlers'
:
{
'file'
:
{
'level'
:
'DEBUG'
,
'level'
:
'DEBUG'
,
# will log all errors
'class'
:
'logging.FileHandler'
,
# make sure to change this to the proper path, and one that
# can be written to
'filename'
:
'/path/to/django/debug.log'
,
},
# 'mail_admins' by default does not include a traceback attachment
# setting 'include_html' to True will attach an html traceback file to the email
# you can also set an addtional 'email_backend' arg to a custom email handler (e.g. SES)
'mail_admins'
:
{
'level'
:
'ERROR'
,
'class'
:
'django.util.log.AdminEmailHandler'
,
'include_html'
:
True
,
},
},
# logs request errors
'loggers'
:
{
...
...
@@ -246,5 +255,7 @@ if not DEBUG:
'level'
:
'DEBUG'
,
'propagate'
:
True
,
},
# django's default loggers send request and security messages at the ERROR
# or CRITICAL level to the AdminEmailHandler via mail_admins
},
}
roomlist/settings/urls.py
View file @
b17de2c7
...
...
@@ -5,7 +5,6 @@ from django.conf.urls import patterns, include, url
from
django.contrib.auth.decorators
import
login_required
from
django.views.generic
import
TemplateView
from
django.contrib
import
admin
from
django.views.decorators.cache
import
cache_page
# imports from your apps
from
.views
import
HomePageView
from
haystack.views
import
SearchView
...
...
@@ -20,12 +19,8 @@ urlpatterns = patterns('',
# project-level urls
url
(
r
'^$'
,
HomePageView
.
as_view
(),
name
=
'homepage'
),
url
(
r
'^about/$'
,
cache_page
(
60
*
15
)(
TemplateView
.
as_view
(
template_name
=
'about.html'
)),
name
=
'about'
),
url
(
r
'^privacy/$'
,
cache_page
(
60
*
15
)(
TemplateView
.
as_view
(
template_name
=
'privacy.html'
)),
name
=
'privacy'
),
url
(
r
'^about/$'
,
TemplateView
.
as_view
(
template_name
=
'about.html'
),
name
=
'about'
),
url
(
r
'^privacy/$'
,
TemplateView
.
as_view
(
template_name
=
'privacy.html'
),
name
=
'privacy'
),
# app-level urls
url
(
r
'^housing/'
,
include
(
'housing.urls'
)),
...
...
roomlist/templates/about.html
View file @
b17de2c7
...
...
@@ -6,6 +6,9 @@ SRCT Roomlist • About
{% block content %}
{% load cache %}
{% cache 900 about %}
<div
class=
"container container-padding"
>
<div
class=
"row"
>
<div
class=
"col-lg-12 license"
>
...
...
@@ -88,4 +91,5 @@ SRCT Roomlist • About
</div>
</div>
{% endcache %}
{% endblock %}
roomlist/templates/landing.html
View file @
b17de2c7
...
...
@@ -6,7 +6,7 @@
{% include 'messages.html' %}
{% load cache %}
{% cache 1
20
landing request.user.username %}
{% cache 1
5
landing request.user.username %}
{% load gravatar %}
<h2>
Welcome Back {{ me.get_first_name_or_uname }}!
</h2>
...
...
@@ -67,7 +67,9 @@
</div>
{% endif %}
{% endcache %}
{% cache 120 landing_majors request.user.username %}
{% if not me.major %}
<h3><em><a
href=
"{% url 'updateStudent' request.user.username %}"
>
Set your major
</a>
, and we'll show you some of the other students in your program.
</em></h3>
{% else %}
...
...
roomlist/templates/privacy.html
View file @
b17de2c7
...
...
@@ -5,6 +5,8 @@ SRCT Roomlist • Privacy Policy
{% endblock %}
{% block content %}
{% load cache %}
{% cache 900 privacy %}
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
...
...
@@ -171,4 +173,5 @@ SRCT Roomlist • Privacy Policy
</div>
</div>
{% endcache %}
{% endblock %}
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