Commit 99866cb6 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

merged admin-app

parents 1363d56e 17937a51
from django.db import models
# Create your models here.
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from .views import index
management_urls = patterns('',
url(
regex=r'^$',
view=index,
name="index"
)
)
from django.http import Http404
from django.shortcuts import render_to_response
def index(request):
return render_to_response('management/index.html')
# Django settings for whats_open project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# Insert a ('Name', 'Email') inside ADMINS tuple
ADMINS = ('Your Name', 'youremail@example.com')
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',
'website',
'management',
)
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
# 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 = ''
{% extends "management/layouts/base.html" %}
{% load static %}
{% block content %}
<div class="container">
<div class="row">
<h1>Manage {Facility}</h1>
</div>
</div>
{% endblock %}
{% extends "management/layouts/base.html" %}
{% load static %}
{% block content %}
<div class="container">
<h1>Manage</h1>
</div>
{% endblock %}
<head>
{% load staticfiles %}
<meta charset="utf-8">
<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">
{% endblock stylesheets %}
<title>
{% block title %}What's Open - Management{% endblock %}
</title>
</head>
<body>
<div class="toolbox">
<div id="wrap">
{% include 'management/layouts/navbar.html' %}
<div class="container">
{% block content %}{% endblock content %}
</div>
</div>
</div>
</body>
{% include 'management/layouts/footer.html' %}
<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>
<hr>
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="col-md-8">
<a href="">About</a>
&middot;
<a href="">Contact</a>
&middot;
<a href="http://srct.gmu.edu/usage-policy">Terms of Service</a>
&middot;
<a href="">Privacy</a>
</div>
<div class="col-md-4">
<p class="muted pull-right">A project of GMU <a href="http://srct.gmu.edu/"><strong>SRCT</strong></a>. View <a href="http://git.gmu.edu/srct/whats-open/">our code</a>.</p>
</div>
</div>
</div>
</div>
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href=""><strong>What's Open</strong> - Management</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="">About</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="/logout">Log Out</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</div>
This diff is collapsed.
body{padding-top:50px}
#banner{border-bottom:none}
.page-header h1{font-size:4em}
.bs-docs-section{margin-top:8em}
footer{margin:5em 0}footer li{float:left;margin-right:1.5em;margin-bottom:1.5em}
footer p{clear:left;margin-bottom:0}
.splash{background-color:#1c2533;background:-webkit-linear-gradient(70deg, #080f1f 30%, #2b4b5a 87%, #435e67 100%);background:-o-linear-gradient(70deg, #080f1f 30%, #2b4b5a 87%, #435e67 100%);background:-ms-linear-gradient(70deg, #080f1f 30%, #2b4b5a 87%, #435e67 100%);background:-moz-linear-gradient(70deg, #080f1f 30%, #2b4b5a 87%, #435e67 100%);background:linear-gradient(20deg, #080f1f 30%, #2b4b5a 87%, #435e67 100%);background-attachment:fixed;padding:6em 0 2em;color:#fff;text-align:center}.splash .alert{margin:4em 0 2em}
.splash h1{font-size:4em}
.splash #social{margin-top:6em}
.section-tout{padding:4em 0 3em;border-top:1px solid rgba(255,255,255,0.1);border-bottom:1px solid rgba(0,0,0,0.1);background-color:#eaf1f1}.section-tout .fa{margin-right:.5em}
.section-tout p{margin-bottom:3em}
.section-preview{padding:4em 0 4em}.section-preview .preview{margin-bottom:4em;background-color:#eaf1f1;border:1px solid rgba(0,0,0,0.1);border-radius:6px}.section-preview .preview .image{padding:5px}.section-preview .preview .image img{border:1px solid rgba(0,0,0,0.1)}
.section-preview .preview .options{text-align:center;padding:0 2em 2em}.section-preview .preview .options p{margin-bottom:2em}
.section-preview .dropdown-menu{text-align:left}
.section-preview .lead{margin-bottom:2em}
@media (max-width:767px){.section-preview .image img{width:100%}}
.bsa .one .bsa_it_ad{border:none !important;background-color:transparent !important}.bsa .one .bsa_it_ad .bsa_it_t,.bsa .one .bsa_it_ad .bsa_it_d{color:inherit !important}
.bsa .one .bsa_it_p{display:none}
.table > tbody > tr > td {
vertical-align: middle;
}
@media screen and (max-width: 379px) {
.page-header h1 {
font-size: 3.2em;
}
}
/* Sticky footer styles
-------------------------------------------------- */
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 95%;
height: auto;
/* Negative indent footer by its height */
margin: 0 auto -50px;
/* Pad bottom by footer height */
padding: 0 0 50px;
}
/* Set the fixed height of the footer here */
#footer {
height: 50px;
}
.centered{
text-align: center;
}
...@@ -4,6 +4,8 @@ from django.conf.urls import patterns, include, url ...@@ -4,6 +4,8 @@ from django.conf.urls import patterns, include, url
from django.contrib import admin from django.contrib import admin
admin.autodiscover() admin.autodiscover()
from management.urls import management_urls
urlpatterns = patterns('', urlpatterns = patterns('',
# Examples: # Examples:
# url(r'^$', 'whats_open.views.home', name='home'), # url(r'^$', 'whats_open.views.home', name='home'),
...@@ -11,8 +13,7 @@ urlpatterns = patterns('', ...@@ -11,8 +13,7 @@ urlpatterns = patterns('',
# Uncomment the admin/doc line below to enable admin documentation: # Uncomment the admin/doc line below to enable admin documentation:
url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^management/', include(management_urls)),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
url(r'', include('website.urls')), url(r'', include('website.urls')),
......
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