Commit 27ce41f7 authored by Daniel W Bond's avatar Daniel W Bond

Merge branch 'movearound'

Oh god this is messy
parents dd62dd78 ad0a49c3
......@@ -72,9 +72,9 @@ MIDDLEWARE_CLASSES = (
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'settings.urls'
ROOT_URLCONF = 'advisor.urls'
WSGI_APPLICATION = 'settings.wsgi.application'
WSGI_APPLICATION = 'advisor.wsgi.application'
# Database
......
......@@ -2,7 +2,12 @@ from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('trajectories.views',
from django.contrib.auth.views import login, logout
from advisor.views import about, index
#, login?
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'advisor.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
......@@ -25,23 +30,6 @@ urlpatterns = patterns('trajectories.views',
# about page
url(r'^about/$', 'about', name = 'about'),
# course
url(r'^course/(?P<courseName>\w+)/$', 'course', name = 'course'),
# student's page
url(r'^user/(?P<username>\w+)/$', 'student', name = 'student'),
# single trajectory page
url(r'^user/(?P<username>\w+)/(?P<trajectoryslug>\w+)$', 'trajectory', name = 'trajectory'),
# creating the trajectory
# url(r'^user/(?P<username>\w+)/create/$', 'create', name = 'create'),
url(r'^create/$', 'create', name = 'create'),
# comparison page
# url(r'^user/(?P<username>\w+)/compare/$', 'compare', name = 'compare'),
url(r'^compare/$', 'compare', name = 'compare'),
# admin pages
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
......
from django.shortcuts import render, render_to_response, get_object_or_404
from trajectories.models import Course, CourseCollection, Program, Student, Trajectory
from django.db.models import Max
# processing functions
# page render functions
# this is where all users not signed in are redirected
#@login_required
def login(request):
return render(request, 'login.html', {
"courses" : courses
},
)
# "homepage", create a new trajectory
#@login_required
def index(request):
return render(request, 'index.html', {
},
)
# search
# # # # # STATIC PAGES # # # # #
# SRCT, how to contribute information, how Advisor works
def about(request):
return render(request, 'about.html', {
},
)
# def privacy(request):
from django.contrib import admin
# Register your models here.
from django.db import models
# Create your models here.
from django.test import TestCase
# Create your tests here.
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
from analysis.views import compare, analytics
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'advisor.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
# comparison page
# url(r'^user/(?P<username>\w+)/compare/$', 'compare', name = 'compare'),
url(r'^compare/$', 'compare', name = 'compare'),
# analytics page
# url(r'user/(?P<username>\w+)/analytics/$', 'analytics', name = 'analytics'),
url(r'^analytics/$', 'analytics', name = 'analytics'),
)
from django.shortcuts import render, render_to_response, get_object_or_404
from trajectories.models import Course, CourseCollection, Program, Student, Trajectory
from django.db.models import Max
# processing functions
# def analyzeEverything():
# page render functions
# compares saved trajectories
#@login_required
# def compare(request, slug):
def compare(request):
# this is gonna be hella slow; I need to learn how ajax works and what
# it will actually need
trajectories = Trajectory.objects.all()
return render(request, 'compare.html', {
'trajectories' : trajectories,
},
)
......@@ -3,7 +3,7 @@ import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "advisor.settings")
from django.core.management import execute_from_command_line
......
......@@ -9,108 +9,11 @@ GMU Advisor
<div class="page-header" id="banner">
<div class="row">
<div class="col-md-12 text-center">
<h1><strong>GMU</strong>&#8203;ADVISOR</h1>
<p class="lead">Automated Undergraduate Academic Advising*</p>
<h1>Advisor</h1>
</div>
</div>
</div>
<p><h4>Select the classes you've already taken, and follow the instructions to start visualizing your way to completing your degree.</h4></p>
<p>*Not intended as a replacement for formal academic advising through your department. Currently only supports undergraduate programs.</p>
<div class="row well">
<div class="col-md-12">
<form class="form-horizontal" action="" method="post" role="form" enctype="multipart/form-data">
{% csrf_token %}
<fieldset>
<legend>Select your courses(s).</legend>
{% if courses %}
<div class="alert alert-info">Do you need to update the courses you've already taken?</div>
{% else %}
<div class="form-group">
<label for "departmentAbbr" class="col-sm-2">Department Abbreviation</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="Program" placeholder="ENGH">
</div>
<label for "courseNumber" class="col-sm-1">Course Number</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="Program" placeholder="302">
</div>
<!-- Name loads automatically -->
<label for "name" class="col-sm-1">Name</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="Program" placeholder="Advanced Composition">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary">+</button>
</div>
<!-- not sure how to have a zillion of these fields keep on appearing -->
</div>
{% endif %}
<legend>Select your program(s).</legend>
<div class="form-group">
<label for "Program" class="col-sm-2">Program</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="Program" placeholder="Government and International Politics">
<!-- autocompletion would be awesome -->
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary">+</button>
</div>
</div>
<legend>Select your minor(s).</legend>
<div class="form-group">
<label for "Minor" class="col-sm-2">Minor</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="Minors" placeholder="Software Engineering">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary">+</button>
</div>
</div>
<!-- #cooljsideas for this and select program, have a new field slide out
when one has been entered (2 for degree, 3 for minor)-->
<legend>Are you in the Honors College?</legend>
<div class="form-group">
<label for "honorscollege" class="col-sm-2">Honors</label>
<div class="col-sm-5">
<button type="button" class="btn btn-default">Yes</button>
<button type="button" class="btn btn-primary">No</button>
</div>
</div>
<legend>What is your current semester?</legend>
<div class="form-group">
<label for "degreeType" class="col-sm-2">Current Semester</label>
<div class="col-sm-3">
<select class="form-control">
<option>First Semester Freshman</option>
<option>Second Semester Freshman </option>
<option>First Semester Sophomore</option>
<option>Second Semester Sophomore</option>
<option>First Semester Junior</option>
<option>Second Semester Junior</option>
<option>First Semester Senior</option>
<option>Second Semester Senior</option>
<option>First Semester SuperSenior</option>
<option>Second Semester SuperSenior</option>
<option>First Semester SuperSuperSenior</option>
<!-- option You Mayyyyy Want to Consider Seeing an Actual Person /option -->
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-11 col-sm-1">
<button type="submit" class="btn btn-primary" value="Submit">Submit</button>
<!-- need to have the bar across the top loading js -->
</div>
</div>
</fieldset>
</form>
</div>
</div>
<p>*Not intended as a replacement for formal academic advising through your department.</p>
{% endblock %}
{% extends 'layouts/base.html' %}
{% block title %}
GMU Advisor
{% endblock %}
{% block content %}
<div class="page-header" id="banner">
<div class="row">
<div class="col-md-12 text-center">
<h1><strong>GMU</strong>&#8203;ADVISOR</h1>
<p class="lead">Automated Undergraduate Academic Advising*</p>
</div>
</div>
</div>
<p><h4>Select the classes you've already taken, and follow the instructions to start visualizing your way to completing your degree.</h4></p>
<div class="row well">
<div class="col-md-12">
<form class="form-horizontal" action="" method="post" role="form" enctype="multipart/form-data">
{% csrf_token %}
<fieldset>
<legend>Select your courses(s).</legend>
{% if courses %}
<div class="alert alert-info">Do you need to update the courses you've already taken?</div>
{% else %}
<div class="form-group">
<label for "departmentAbbr" class="col-sm-2">Department Abbreviation</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="Program" placeholder="ENGH">
</div>
<label for "courseNumber" class="col-sm-1">Course Number</label>
<div class="col-sm-1">
<input type="text" class="form-control" id="Program" placeholder="302">
</div>
<!-- Name loads automatically -->
<label for "name" class="col-sm-1">Name</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="Program" placeholder="Advanced Composition">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary">+</button>
</div>
<!-- not sure how to have a zillion of these fields keep on appearing -->
</div>
{% endif %}
<legend>Select your program(s).</legend>
<div class="form-group">
<label for "Program" class="col-sm-2">Program</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="Program" placeholder="Government and International Politics">
<!-- autocompletion would be awesome -->
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary">+</button>
</div>
</div>
<legend>Select your minor(s).</legend>
<div class="form-group">
<label for "Minor" class="col-sm-2">Minor</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="Minors" placeholder="Software Engineering">
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary">+</button>
</div>
</div>
<!-- #cooljsideas for this and select program, have a new field slide out
when one has been entered (2 for degree, 3 for minor)-->
<legend>Are you in the Honors College?</legend>
<div class="form-group">
<label for "honorscollege" class="col-sm-2">Honors</label>
<div class="col-sm-5">
<button type="button" class="btn btn-default">Yes</button>
<button type="button" class="btn btn-primary">No</button>
</div>
</div>
<legend>What is your current semester?</legend>
<div class="form-group">
<label for "degreeType" class="col-sm-2">Current Semester</label>
<div class="col-sm-3">
<select class="form-control">
<option>First Semester Freshman</option>
<option>Second Semester Freshman </option>
<option>First Semester Sophomore</option>
<option>Second Semester Sophomore</option>
<option>First Semester Junior</option>
<option>Second Semester Junior</option>
<option>First Semester Senior</option>
<option>Second Semester Senior</option>
<option>First Semester SuperSenior</option>
<option>Second Semester SuperSenior</option>
<option>First Semester SuperSuperSenior</option>
<!-- option You Mayyyyy Want to Consider Seeing an Actual Person /option -->
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-11 col-sm-1">
<button type="submit" class="btn btn-primary" value="Submit">Submit</button>
<!-- need to have the bar across the top loading js -->
</div>
</div>
</fieldset>
</form>
</div>
</div>
<p>*Not intended as a replacement for formal academic advising through your department.</p>
{% endblock %}
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
from trajectories.views import course, student, trajectory, create, new
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'advisor.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
# course
url(r'^course/(?P<courseName>\w+)/$', 'course', name = 'course'),
# student's page
url(r'^user/(?P<username>\w+)/$', 'student', name = 'student'),
# single trajectory page
url(r'^user/(?P<username>\w+)/(?P<trajectoryslug>\w+)$', 'trajectory', name = 'trajectory'),
# a new trajectory
# url(r'^user/(?P<username>\w+)/new/$', 'new', name = 'new'),
url(r'^new/$', 'new', name = 'new'),
# creating the trajectory
# url(r'^user/(?P<username>\w+)/create/$', 'create', name = 'create'),
url(r'^create/$', 'create', name = 'create'),
)
......@@ -108,23 +108,13 @@ def enoughCourses(coursesTaken):
# page render functions
# this is where all users not signed in are redirected
#@login_required
def index(request):
courses = [] # student's courses
return render(request, 'index.html', {
"courses" : courses
},
)
# "homepage", create a new trajectory
#@login_required
def index(request):
# a page for creating new trajectories
# @login_required
def new(request):
return render(request, 'index.html', {
return render(request, 'new.html', {
},
)
}
# student selects the classes for their trajectories
# @login_required
......@@ -195,17 +185,3 @@ def trajectory(request, slug):
'trajectory' : trajectory,
},
)
# search
# # # # # STATIC PAGES # # # # #
# SRCT, how to contribute information, how Advisor works
def about(request):
return render(request, 'about.html', {
},
)
# def privacy(request):
......@@ -4,3 +4,12 @@ argparse==1.2.1
django-auth-ldap==1.1.7
python-ldap==2.4.13
wsgiref==0.1.2
Django==1.6
South==0.8.4
Whoosh==2.5.6
argparse==1.2.1
django-auth-ldap==1.1.7
django-gravatar2==1.1.3
django-haystack==2.1.0
python-ldap==2.4.13
wsgiref==0.1.2
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