Commit 11f81b53 authored by root's avatar root

initial

parents
*.pyc
*.sw*
*~
Flask==0.10.1
Flask-Admin==1.0.7
Flask-Mail==0.9.0
Flask-WTF==0.9.4
Jinja2==2.7.2
MarkupSafe==0.18
WTForms==1.0.5
Werkzeug==0.9.4
argparse==1.2.1
blinker==1.3
distribute==0.6.24
flask-peewee==0.6.5
itsdangerous==0.23
peewee==2.2.1
wsgiref==0.1.2
wtf-peewee==0.2.2
#!flask/bin/python
from website import website
if __name__ == '__main__':
website.run(debug=True,host='0.0.0.0')
from flask import Flask
website = Flask(__name__)
from website import routes
from flask_wtf import Form
from wtforms.validators import DataRequired
class FeatureReqestForm(Form):
This diff is collapsed.
from flask import render_template,request,flash,redirect
from website import website
from forms import FeatureRequestForm
import pycas as pycas
CAS_SERVER = "https://login.gmu.edu/login"
SERVICE_URL = "http://129.174.177.239/cgi-bin/pycas.py"
@website.route('/login')
def my_login():
status, id, cookie = pycas.login(CAS_SERVER, SERVICE_URL, secure=1, opt="gateway")
return redirect(url_for('home'))
@website.route('/')
def home():
return render_template('index.html')
@website.route('/feature-request', method=['GET','POST'])
def process_request():
form = FeatureRequestForm()
if form.validate_on_submit():
flash('Request Successly Submitted')
return redirect(url_for('home'))
return render_template('feature_request.html',title='Request Form', form=form)
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