Giter VIP home page Giter VIP logo

ummbnet's Introduction

#ummbNet

A web app for the University of Minnesota Pep Bands. It serves as a request board for members to easily trade performance spots while keeping the directors informed of who will be at each event.

It started as an independent study project to dive into Python web development. The first version with minimal functionality is live now. As time permits, a long list of security and usability changes will be implemented. It is very much a work in progress.

ummbNet is built with Flask and SQLAlchemy. The deployed version (at ummb.net) runs through uWSGI behind nginx with a Postgres database.

##Getting Started

###Dependencies:

  • Python 2.7+
  • pip

###Installation: First, rename sample-config.py to config.py. You will need to change the settings to match your database and mail server configuration, and change SECRET_KEY to a real secret key.

Run the following commands:

$ git clone https://github.com/kevana/ummbNet.git
$ cd ummbNet
$ mkdir log
$ mkdir tmp
$ pip install -r requirements.txt
$ python create_db.py
$ python main.py

requirements.txt includes psycopg2 for use with a Postgres database. To use a different database system you will need to install the DBAPI for it (e.g. mysql-python for MySQL).

Optional: load_test_data.py contains dummy data (users, events, requests) to see how it looks with content.

$ python load_test_data.py

If you follow those steps you should have a copy of ummbNet running at http://localhost:5000/. There is currently no way to create a new user with admin or director privileges through the web interface. You can create users programmatically in a python interpreter using the is_admin and is_director flags.

Example:

$ cd ummbNet
$ source env/bin/activate
(env)$ python
>>> from main import *
>>> admin = User(username='admin', \
...              email='[email protected]', \
...              password='PASSWORD', \
...              is_admin=True, \
...              is_director=True)
...
>>> db.session.add(admin)
>>> db.session.commit()

###Testing

ummbNet uses python's unittest module. Tests are in the testing subfolder, split into separate files nominally by feature. To run all test cases and generate a code coverage report at tmp/coverage/index.html use the main test module:

$ python testing/test-main.py

This may take a fair amount of time to run. To run individual test cases, call the test case file directly:

$ python testing/sub_module_tests.py

Toolbox

What I've used to make ummbNet so far.

Flask extensions:

  • Flask-Bcrypt
  • Flask-Login
  • Flask-Mail
  • Flask-Migrate
  • Flask-SQLAlchemy
  • Flask-WTF

UI eye candy: Twitter's Bootstrap

##License

All source code is released under the MIT License. All user content is owned by its respective creator.

See LICENSE for more information.

ummbnet's People

Contributors

kevana avatar mplewis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

ummbnet's Issues

Error checking

  • Handle ORM Exceptions when adding or modifying data
  • TBD

Separate emails or use bcc

BCC should be a quick fix. If it still shows up as bcc in UMN Gmail may want to switch to sending with individual recipients.

Update User Model

Add members:

  • Real name (first and last)
  • Instruments played
  • Phone number?
    Contemplate other items

Update Event model

  • Add band attribute to event
  • Update constructor
  • Check for other missing relationships

CSRF

Not very high on the threat model, but should be done at some point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.