Tracker for Lost in the Darkness
What is lost-tracker?
This application is a tool to help organisation of a local event ("Lost in the Darkness"). If you are not involved with this event, you can most likely move on :)
In short: It helps with registration of groups for a game. Once the game is live, it helps live-tracking of the scores of the competing teams via a mobile app.
- fabric (Python Task Runner). This is optional but highly convenient!
- Python 2.7 (Python 3.5 was tested half-arsedly, may work...)
- A database. I recommend PostgreSQL as the application has been tested with that one.
The application sends e-mails. If it's running in "DEBUG" mode (see the
.inifile), those e-mails are NOT sent. Instead, they are only logged.
During development, there's an additional route available:
/fake_loginwhich immediately logs you in as admin. You can also log-in as standard user by specifying an e-mail in the request:
This route is obviously not available in the production environment (or, to be more precive, when run as a WSGI application). NEVER run this application in debug mode on a production host!
Setting up the development environment
You MAY run into missing system dependencies (header files) as some third-party Python modules contain C source. You will see this if you get a "File not found" error. On the top of my head, those dependencies should be:
- python-dev (for anything, really)
- libpq-dev (For postgres connections)
- libjpeg-dev (for thumbnail generation in the image gallery)
- libffi-dev (for social logins)
Additionally, I strongly recommend to install the official Oracle Java binaries (for the plovr server). I have tried with OpenJDK with mixed results. The official binaries work best!
If you want to develop on lost-tracker, follow these steps to get a development environment up and running:
Clone the code:
git clone https://github.com/exhuma/lost-tracker
Enter the cloned folder, switch to the
develop branch and run the develop
fabric-task. Running that task will set up a virtual-env, download required
dependencies and install the application into that environment:
cd lost-tracker git checkout develop # Make sure you're on the latest developmen branch fab develop # Prepares a virtualenv and downloads dependencies.
When this successfully completes you should have an environment ready for happy hacking.
the help of plovr. Those dependencies should have been downloaded for you into
__libs__ folder. You must run plovr during development! As a
convenience, there is a fabric task to run this for you:
Running a Development Instance
Settings for the development server are in your configuration file in the
[devserver]. Make sure to set these to your liking.
You should also adapt the database connection string, and while you're at it, look through the rest of the config file as well.
Once all is configured the development server can be run with:
During development (when
DEBUG=True), you also need to run the plovr
server in parallel. Simply open a new shell and type:
Social Logins During Development
You can skip social logins during development by accessing the URL
/fakelogin. This is only accessible when running the development server
though. On production, this route is unavailable for security reasons.