Whysaurus
License:
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
Basic Setup Instructions:
- Clone
- Get
constants.py
from a collaborator and put it in the root directory of this project (the directory this file lives in) - Follow steps 1-5 on https://cloud.google.com/appengine/docs/standard/python/download
- Install
less
- OSX:
brew install npm && npm install -g less
- OSX Alternative: SimpLESS, but have needed to apply this patch: https://gist.github.com/hlop/4951717
- Windows: try WinLESS, and only compile the files listed in bin/compilelessc.sh, and set their output (by right clicking on the files) to /static/css.
- Run
bin/compilelessc.sh
to compile CSS resources For Linux just runnpm install -g less
- Set the data storage location for local development
bin/run.sh
or run in the Google App Engine Launcher and set to port 8081
Detailed Setup Instructions:
-
Make a github account: https://github.com/
-
Get Directory:
- Go to: https://github.com/aaronlifshin/whysaurus
- Download the directory folder zip from the right column
- Get constants.py from a collaborator and put it in the directory folder
- Google App Engine:
- Go to: https://cloud.google.com/appengine/docs/standard/python/download
- Follow steps 1 - 5 to install python 27, the app sdk, and the components for DJango
- Install Less
- OSX Homebrew
- Install (Homebrew)[https://brew.sh/]
- Install npm:
brew install npm
- Install less:
npm install -g less
- SimpLESS:
- Download and install SimpLESS: http://wearekiss.com/simpless
- Open SimpLESS
- In your directory folder, find less folder
- From that folder drag and drop bootstrap.less, new.less and responsive.less into SimpLESS
- For all three files, click on the fielder icon to change the path to static > css. Also change the responsive css file name to bootstrap-responsive.css
- Click the refresh icons
- You may need to apply this patch: https://gist.github.com/hlop/4951717/ (download gist, close SimpLESS, right-click SimpLESS in your applications folder and select show package contents, copy the downloaded less.js to SimpLESS\Resources\app\3p and overwrite the existing file
- If you refresh your locally hosted Whysaurus page, it should now have the correct styling
-
Create a Whysaurus account using email (google and facebook don't work locally, currently)
-
Make your local Whysaurus account an admin (Currently a different procedure than making a user admin on staging or production!)
- Go to the local console at http://localhost:8000/console
- Select WhysaurusUser from the Entity Kind drop-down menu and click list entries
- Click on the key of your new Whysaurus account
- Change Admin to true
- Scroll down to click save
- Click Flush Memcache
- Data storage for local development environment
- If you'd like to prevent your local database and search indexes from being truncated every few days, add the following option to the dev_appserver.py command in bin/run.sh:
- --storage_path=~/<directory_in_your_user_tree>
- If at some point you need to clear your local database and/or search indexes, start dev_appserver.py with one or both of these options:
- --clear_datastore True
- --clear_search_indexes True