Giter VIP home page Giter VIP logo

sciencebowl's Introduction

sciencebowl

A question bank application for Science Bowl created by Albany High School students and alums.

Setting up your enviornment

Make sure you have Python installed properly and Postgres

Then:

$ git clone https://github.com/andimus/sciencebowl
$ cd sciencebowl
$ pip install -r requirements.txt
$ createdb sciencebowl
$ python manage.py migrate
$ python manage.py collectstatic

If you want to be able to deploy to heroku, you'll need to install the Heroku Toolbelt, get access from an admin.

Then:

$ heroku git:remote -a sciencebowl

Running Locally

Once you've set things up, you can run locally:

$ heroku local

Your app should now be running on localhost:5000.

Deploying to Heroku

$ git push heroku master

The app is now live at: https://sciencebowl.herokuapp.com.

Admin Functionality

Python has some nice built in admin functionality we can use to edit the DB.

Create a superuser

$ python manage.py createsuperuser

You should be able to use the admin page at: http://localhost:5000/admin

Note: don't forget to add new tables to admin.py to be able to edit them.

Changing Schema

After a schema change, you'll need to migrate your database locally to work. To do this run:

$ python manage.py makemigrations
$ python manage.py migrate

Also, make sure to include your migration files (the hello/migrations/####_auto...py files generated by the makemigrations script) when you check in. After you deploy, run the migrate function on heroku:

$ heroku run python manage.py migrate

Documentation

For more information about using Python on Heroku, see these Dev Center articles:

sciencebowl's People

Contributors

evanzhong avatar andimus avatar frankdai320 avatar silentctrl avatar

Watchers

James Cloos avatar  avatar

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.