-
Notifications
You must be signed in to change notification settings - Fork 6
Development Environment
Note: These instructions may written from a MacOS perspective. Adjustments may be necessary for other operating systems.
Check out this Gig-O-Matic repository. If you are not familiar with Git, check out the Github getting started instructions
For example:
git clone https://github.com/SecondLiners/GO2.git
The maintainers recommend the Anaconda distribution. We will be using its package manager to avoid mixing package versions with other projects. After installation, you can verify that you are running the correct Python version by running which python
.
Also install a couple of libraries using pip: Babel and pycrypto
https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python
Boot the Google App Engine development instance:
dev_appserver.py app.yaml
By default, the application will be running on http://localhost:8080. Additionally, the Google App Engine admin interface will be running on http://localhost:8000.
Gig-o-matic uses Babel to handle i18n translation. You need to explicitly compile those messages at the start, and again whenever you change/add to the message set. Compiling i18n is done like this:
pybabel compile -f -d ./locale
(use pip install Babel)
Go to http://localhost:8080/ (or wherever) and you should see the login screen. Create a user account for your main user (lets call that user Jane).
Once you've created an account for Jane, we need to both set her as verified and as a superuser, so she can create bands:
- Go to the admin tools at http://localhost:8000/ and click "Datastore Viewer"
- Select Entity Kind "Member"
- Click "List Entities"
- Click the key for Jane
- Set
is_superuser
to true and thenverified
to true - Click "Save Changes"
This key is used to protect the auth tokens generated for links sent via email. The key is stored inside of Google AppEngine. To set a key, do the following:
- Go to the admin tools at http://localhost:8000/ and click "Interactive Console"
- Paste the following block into the text box:
from crypto_db import set_cryptokey set_cryptokey("A" * 16)
- Click
Execute
Note that if you want to change the crypto key, it must be of a fixed length: either 16, 24, or 32 bytes long.
You should see an "Admin" selection in the top menu. Go to "Band Admin" and "Add a Band", edit the appropriate fields, and then hit Save. (???:whats clid--just some id? can it have spaces etc? ???) Then go to Jane's profile and have her add herself to the new band, then go to the band's page using the link in the profile and accept the membership.
Congratulations! Gig-o-matic is now set up and ready for use!
Some of the tools used:
- Python 2.7
- Google App Engine
- jinja2
- babel http://babel.pocoo.org/
- pytz
- python-dateutil
For installing 2.7 on M1 mac see here: https://stackoverflow.com/questions/67380286/anaconda-channel-for-installing-python-2-7