Commit c882cddf authored by Daniel W Bond's avatar Daniel W Bond
Browse files

oh hey look-- things run

parent 70b97e39
Django>=1.6,<1.7
Django>=1.8,<1.9
South==1.0
argparse
django-autoslug==1.7.2
django-floppyforms==1.1.1
django-gmucas==2.1.1
django-cas-client
django-leaflet==0.11.1
django-model-utils==2.0.2
djangorestframework>=2.3
djangorestframework>=3.1,<3.2
distribute
wsgiref
# Django settings for whats_open project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# Insert a ('Name', 'Email') inside ADMINS tuple
ADMINS = ('SRCT Admin', 'exec@srct.gmu.edu')
MANAGERS = ADMINS
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': PROJECT_PATH + '/database.db'
}
}
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/New_York'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = ''
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(PROJECT_PATH, '..', 'website', 'static')
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = ''
if DEBUG:
# This is a test/local run so security doesn't matter
SECRET_KEY = "testtesttest"
elif SECRET_KEY == '':
raise AssertionError("Must enter unique value for SECRET_KEY setting")
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'settings.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'settings.wsgi.application'
TEMPLATE_DIRS = (
# os.path.join(PROJECT_PATH, 'templates'),
'templates',
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'south',
'rest_framework',
'website',
'management',
#'guardian',
)
CAS_GATEWAY=True
ANONYMOUS_USER_ID = -1
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend', # this is default
'cas.middleware.CASMiddleware',
#'guardian.backends.ObjectPermissionBackend',
)
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
LOGIN_URL='/management/login/'
LOGIN_REDIRECT='/management'
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_SECONDS = 259200
CACHE_MIDDLEWARE_KEY_PREFIX = ''
......@@ -4,7 +4,7 @@ from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from django.views.generic import FormView
from django_gmucas.views import login as caslogin
from cas.views import login as caslogin
from management.forms import LoginForm
@login_required(login_url='/management/login')
......
{% block about %}
{% load staticfiles %}
<div class="row about-content">
<div class="col-md-10 col-md-offset-1">
<a id="about-close"><img src="{% static "img/close.png" %}"></a>
......
{% block footer %}
{% load staticfiles %}
<div id="footer">
<div class="footer-row">
<a class="gmu-brand" href="http://www.gmu.edu">
......
{% 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.">
......
{% block nav %}
{% load staticfiles %}
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
......
......@@ -4,9 +4,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
{% block stylesheets %}
<link rel="icon" href="/favicon.ico">
<link href="{% static "management/css/bootstrap.min.css" %}" rel="stylesheet">
<link href="{% static "management/css/bootswatch.min.css" %}" rel="stylesheet">
<link href="{% static "management/css/extensions.css" %}" rel="stylesheet">
<link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet">
<link href="{% static "css/bootswatch.min.css" %}" rel="stylesheet">
<link href="{% static "css/extensions.css" %}" rel="stylesheet">
{% endblock stylesheets %}
<title>
{% block title %}What's Open - Management{% endblock %}
......@@ -26,4 +26,4 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js"></script>
<script src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
<script src="{% static "js/bootstrap.min.js" %}"></script>
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