A site to help you find other nearby people to trade Magic: The Gathering cards with.
pip install virtualenv
if you don't already have itcd tradebindr
go to wherever you cloned the repovirtualenv venv
create a virtualenvsource venv/bin/activate
activate the virtualenvpip install -r requirements.txt
to install all python dependencies- Install Postgres 9.3 or higher. On Mac it may be easier to use Postgres.app but I haven't tried it. I use the normal install from postgresql.org.
- Create a database named tradebindr or whatever you want. You may need to create a postgres user other than the default user or at least set a password for the default user. I forget.
export DATABASE_URL=postgres://username:password@localhost:5432/database-name
to set a necessary environment variable tradebindr will need to start up. Replace username, password, and database-name of course.- Next we will create the database tables. In the future I'll use Alembic migrations so this will be easier.
python
to start a replfrom app import db
so we can work with the dbdb.create_all()
to populate the database with tablesquit()
we're done there- You did it! Run the app with
python app.py
- You should be able to go to http://localhost:5000
phonegap
- a starting point for packaging this as a Phonegap app through build.phonegap.comstatic
- static assets like images, css, javascript that Flask will serve for nowtemplates
- templates used by render_template() calls inapp.py
home.html
- has some javascript in it to perform card name autocompletionlocation.html
- has some javascript in it to get the users location and ajax post it to the server
app.py
- the entire application. needs to be split up into models and controllers.Procfile
- used by Heroku to launch the applicationrequirements.txt
- python depedencies for installation withpip install -r requirements.txt