Commit 22ee562e authored by Nicholas Anderson's avatar Nicholas Anderson

Now it runs!

parent 0235d34b
{% load staticfiles %}
{% block about %}
<div class="row about-content">
<div class="col-md-10 col-md-offset-1">
{% load staticfiles %}
{% block footer %}
<div id="footer">
<div class="footer-row">
{% load staticfiles %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="description=" content="What's Open is a dynamic web application that lets you easily find out which on-campus locations are currently available. It's a simple alternative to searching for Mason's campus hours and filtering though them to figure out which ones are open.">
{% load staticfiles %}
{% block nav %}
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="navbar-header">
......@@ -6,19 +6,19 @@ class CategorySerializer(serializers.ModelSerializer):
model = Category
class OpenTimeSerializer(serializers.ModelSerializer):
schedule = serializers.RelatedField(many=False)
schedule = serializers.RelatedField(many=False, read_only=True)
class Meta:
model = OpenTime
class ScheduleSerializer(serializers.ModelSerializer):
open_times = OpenTimeSerializer(many=True)
open_times = OpenTimeSerializer(many=True, read_only=True)
class Meta:
model = Schedule
class FacilitySerializer(serializers.ModelSerializer):
category = serializers.RelatedField(many=False)
main_schedule = serializers.RelatedField(many=False)
special_schedules = serializers.RelatedField(many=True)
category = serializers.RelatedField(many=False, read_only=True)
main_schedule = serializers.RelatedField(many=False, read_only=True)
special_schedules = serializers.RelatedField(many=True, read_only=True)
class Meta:
model = Facility
from django.conf.urls import patterns, include, url
from website.views import *
from rest_framework.routers import DefaultRouter
from django.conf.urls.static import static
from whats_open.settings import local as settings_local
router = DefaultRouter()
router.register(r'categories', CategoryViewSet)
......@@ -11,4 +13,4 @@ router.register(r'opentimes', OpenTimeViewSet)
urlpatterns = patterns('website.views',
url(r'^api/', include(router.urls)),
url(r'^$', 'facility_grid', name='facility_grid'),
) + static(settings_local.STATIC_URL, document_root=settings_local.STATIC_ROOT)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment