Commit 1f9c35a9 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

merges all 1.6 branches

parents 99866cb6 dc6fbf02
......@@ -10,5 +10,5 @@ build
apache
.ropeproject
whats_open/secret_key.py
website/static/admin/
static/admin/
data
- Tyler Halada
- Daniel Bond
- Renfred Harper
- Ben Waters
import floppyforms as forms
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget=forms.PasswordInput)
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from management.views import *
from .views import index
management_urls = patterns('',
url(
regex=r'^$',
view=index,
name="index"
)
urlpatterns = patterns('',
url(r'^$', index, name='index'),
url(r'^login/$', mylogin, name='mylogin'),
)
from django.http import Http404
from django.shortcuts import render_to_response
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 management.forms import LoginForm
@login_required(login_url='/management/login')
def index(request):
return render_to_response('management/index.html')
def mylogin(request):
if request.method == 'POST':
username = request.POST['username']
password = request.POST['password']
user = authenticate(username=username, password=password)
if user is not None:
if user.is_active and user.is_staff:
login(request,user)
return render_to_response('management/index.html')
else:
return render_to_response('403.html')
else:
return render_to_response('management/login.html')
Django>=1.6,<1.7
South==1.0
argparse
django-autoslug==1.7.2
django-floppyforms==1.1.1
django-gmucas==2.1.1
django-leaflet==0.11.1
django-model-utils==2.0.2
djangorestframework>=2.3
distribute
wsgiref
djangorestframework>=2.3
......@@ -5,7 +5,7 @@ DEBUG = True
TEMPLATE_DEBUG = DEBUG
# Insert a ('Name', 'Email') inside ADMINS tuple
ADMINS = ('Your Name', 'youremail@example.com')
ADMINS = ('SRCT Admin', 'exec@srct.gmu.edu')
MANAGERS = ADMINS
......@@ -130,12 +130,23 @@ INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.admindocs',
'south',
'rest_framework',
'website',
'management',
#'guardian',
)
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
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.
......@@ -169,3 +180,5 @@ LOGGING = {
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_SECONDS = 259200
CACHE_MIDDLEWARE_KEY_PREFIX = ''
{% block about %}
<div class="row about-content">
<div class="col-md-10 col-md-offset-1">
<a id="about-close"><img src="{{ STATIC_URL }}img/close.png"></a>
<h3>What is this?</h3>
<p><b>What's Open</b> 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 campus hours and filtering though them to figure out which ones are open.</p>
<h3>How does it work?</h3>
<p>The schedules and locations are based on data taken from <a href="http://www.gmu.edu/resources/welcome/hours.html">Mason's hours of operation page</a>. What's Open then uses this data to determine which locations are open and closed and displays them in a simple format.</p>
</div>
</div>
<div class="row" id="about-example">
<div class="col-md-10 col-md-offset-1" id="about-column">
<div class="row">
<div class="col-sm-6 col-md-4 col-md-offset-1 grid-box">
<div class="restaurant opened">Open</div>
</div>
<div class="col-sm-6 col-md-4 col-md-offset-2 grid-box">
<div class="restaurant closed">Closed</div>
</div>
</div>
</div>
</div>
<div class="row about-content">
<div class="col-md-10 col-md-offset-1">
<p class="about-top-p">Clicking on one of the location boxes will display useful information such as its closing time, location, and the weekly schedule. If you stay on the What's Open page for an extended period of time, the view will automatically update to accurately reflect the locations open at the current time.</p>
<h3>Who made this?</h3>
<p>What's Open is a project created by <a href="http://srct.gmu.edu/">GMU SRCT</a> (Student-Run Computing and Technology), a student-run organization at George Mason University that establishes and maintains systems which provide specific services the Mason community. You can find information on the current developers of the project on the <a href="http://srct.gmu.edu/projects/whatsopen">SRCT website</a>. The <a href="http://git.gmu.edu/srct/whats-open">repository of the source code is hosted online as well</a>.</p>
<h3>What's Next?</h3>
<p>As of right now we only offer information pertaining to dining locations of Mason's campus. In the near future we plan to expand our database in order to display information pertaining to other facilities on GMU's campus including student union buildings, libraries, campus retailers, and more.</p>
<p>Keep in mind that What's Open is currently in beta so if there are any browser compatibilities issues, schedule inaccuracies, or if you have a suggestion you can contact one of the <a href="mailto:rharper2@gmu.edu?Subject=What's Open">developers</a> and we can try to respond to the issue.</p>
</div>
</div>
{% endblock %}
<!DOCTYPE html>
<html>
{% block head %}
<head>
{% include 'head.html' %}
</head>
{% endblock %}
<body>
<div class="holder">
{% block nav %}
<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">
<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="/">what's open</a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<div class="navbar-form navbar-right" role="search">
<div class="form-group">
<input id="searchBar" type="text" class="form-control" placeholder="Search">
</div>
</div>
<ul class="nav navbar-nav navbar-right">
<li>
<a id="about-link">
<span id="about-link-text">About</span><img id="about-close-nav" src="{{ STATIC_URL }}img/close.png">
</a>
</li>
<li class="dropdown" style="display:none;">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Select Campus <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Fairfax</a></li>
<li><a href="#">Arlington</a></li>
<li><a href="#">Prince William</a></li>
</ul>
</li>
</ul>
</div>
</nav>
{% endblock %}
<div id="about-body">
<div class="container" id="about-container">
{% include 'about.html' %}
</div>
</div>
<div id="info-body">
<div class="container" id="info-container">
<div class="row" id="info-row">
<a id="info-close"><img src="{{ STATIC_URL }}img/close.png"></a>
<div class="col-md-12" id="info-name"></div>
<div class="col-md-3" id="info-status"></div>
<div class="col-md-3" id="info-next"></div>
<div class="col-md-3" id="info-location"></div>
<div id="info-schedule"></div>
</div>
</div>
</div>
<div class="container main-container">
<div class="row">
<div class="col-md-12">
{% block content %}
{% endblock %}
</div>
</div>
</div>
{% block footer %}
<div id="footer">
<div class="footer-row">
<a class="gmu-brand" href="http://www.gmu.edu"><img src="{{ STATIC_URL }}img/gmurgb.png" class="gmu-logo"></a>
<div class="col-md-8 col-md-offset-2">
<p class="footer-text">A project of <a href="http://srct.gmu.edu">GMU SRCT</a>. <a href="http://opensource.org/licenses/MIT/">Some rights reserved</a>.<span id="footer-line">&nbsp;&nbsp;|&nbsp;&nbsp;</span><br class="visible-xs visible-sm"/> George Mason University <a href="http://dining.gmu.edu/">Dining Services</a>&nbsp;&nbsp;&nbsp; &nbsp;</p>
</div>
</div>
</div>
{% endblock %}
</div>
</body>
</html>
<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.">
<link rel="icon" href="/favicon.ico">
<link href="{{ STATIC_URL }}css/bootstrap.min.css" rel="stylesheet">
<link href="{{ STATIC_URL }}css/style.css" rel="stylesheet">
<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_URL }}js/grid.js"></script>
<script src="{{ STATIC_URL }}js/typeAhead.js"></script>
<script src="{{ STATIC_URL }}js/info.js"></script>
<script src="{{ STATIC_URL }}js/about.js"></script>
{% block title %}
<title>
What's Open - George Mason University
</title>
{% endblock %}
......@@ -3,5 +3,44 @@
{% block content %}
<div class="container">
<h1>Manage</h1>
<div class="row clearfix">
<div class="col-md-6 column">
<img src="https://scontent-b-iad.xx.fbcdn.net/hphotos-frc3/t1/1426197_10152387296313835_1267403148_n.jpg" height=200 width=200>
</div>
<div class="col-md-6 column">
</div>
</div>
<div class="row clearfix">
<div class="row semester-controls">
<div class="col-lg-2 col-lg-offset-7">
</div>
<div class="col-lg-2">
<a id="create" href="#Create" class="btn btn-block btn-lg btn-primary">Create Facility</a>
</div>
</div>
<div class="col-md-12 column">
<table class="table">
<thead>
<tr>
<th>
Facility
</th>
<th>
Edit
</th>
<th>
Delete
</th>
<th>
Staus
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}
{% extends "management/layouts/base.html" %}
{% block content %}
<div class="page-header" id="banner">
<div class="row">
<div class="col-lg-12 text-center">
<h1><strong>GMU</strong>&#8203;WHATSOPEN</h1>
<p class="lead">A place for managing What's Open</p>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-lg-offset-3">
<div class="well">
{% if form.errors %}
<div class="row">
<div class="col-md-12">
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Oh snap!</strong> Your username and password were not
found. Please try again.
</div>
</div>
</div>
{% endif %}
<form id="login-form" method="post" class="form-horizontal"
action=""> {% csrf_token %}
<fieldset>
<legend>Log In</legend>
<div class="form-group{%if form.errors%} has-error{%endif%}">
<label class="col-lg-2 control-label" for="username">Username</label>
<div class="col-lg-10">
<input type="username" name="username" id="username"
class="form-control" placeholder="Username" />
</div>
</div>
<div class="form-group{%if form.errors%} has-error{%endif%}">
<label class="col-lg-2 control-label" for="password">Password</label>
<div class="col-lg-10">
<input type="password" name="password" id="password"
class="form-control" placeholder="Password" />
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<input type="submit" class="btn btn-primary" value="Sign In" />
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
{% endblock %}
{% extends 'layouts/base.html' %}
{% extends 'base.html' %}
{% block campus %}
Fairfax
{% endblock %}
{% block content %}
<div id="grid">
</div>
{% 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