Run PQ through your local GAE SDK server.
IMPORTANT: To avoid having to refresh your datastore every time you restart your machine (when /tmp/ is wiped), manually define a location for your datastore and history files like in a saved command script:
dev_appserver.py --datastore_path=/Users/james/Code/pq.datastore --history_path=/Users/james/Code/pq.datastore.history /Users/james/Code/PlopQuiz
see 'getting started' for details about configuring dev_appserver.py.
Seeding Your Datastore
You can load data into your datastore at /dev/admin by loading each data type, from top to bottom. (If "Refresh Subject Images" returns an error, you are likely having a PIL problem that can be resolved by 1) making sure you have PIL installed and 2) using the command-line dev_appserver utility, not the App Engine GUI. )
If you are running your SDK server for the first time, you must restore data before your server will properly function.
URL patterns are defined in /urls.py.
Each application is stored in an eponymous folder. Typically, each application consists of:
-- views.py - renders the template for a page
-- rpc.py - XML-RPC methods
-- methods.py - shared methods, and code chunks too large for a views.py class.
-- Templates are in /templates/, in the folder corresponding to the application.
-- Models are defined in /models/
-- Libraries and utilities are in /utils/
-- Stylesheets are in /static/stylesheets/
-- Images are in /static/stylesheets/img/
-- Backup JSON and files that need to be opened during execution are in /data/
-- Note: Only files in /static/ that are not designated as static in the app.yaml are actually static. Static files cannot be accessed from a server-side script (including templates).
You must be logged in as an administrator to use developer methods.
On the development server, this is as easy as clicking the "Sign in as Administrator" checkbox.
For convenience while developing offline, you can click "convenience" at the login screen to bypass proxy authentication. This is also available as "Quick Login" from the admin page.
You can then enter your UID as an argument, like "http://localhost:8080/dev/admin?shortcut=login&uid=myusername"
This method can also be used to login to any existing user account.
/dev/admin - datastore operations. /console/ - interactive console, datastore and memcache administration, pastebin, logs, etc.