This is a demo app for mobiles written using Flask and jQuery Mobile. The backend storage is MongoDB.
The app basically allows you to mark/add items to a list and share the list itself from your mobile phone and your pc! So if one day your fellow needs some stuff from the grocery he can just add the items to the list and you’ll have it at your fingers later, when at the mall!
It has been deployed on OpenShift where Flask and pymongo are installed at deployment time, loot at the `setup.py` file in the root.
Create the application on OpenShift:
$ rhc app create -a myshoppinglist -t python-2.6
add the mongodb cartridge:
$ rhc cartridge add -a myshoppinglist -c mongodb-2.2
add my github repo as a remote to your copy of the app, the pull and merge the diffs:
$ cd myshoppinglist $ git remote add upstream git://github.com/giulivo/openshift-myshoppinglist.git $ git pull -X theirs upstream master
push to OpenShift:
$ git push
and that’s it, go at http://myshoppinglist-$YOURDOMAIN.rhcloud.com and enjoy!
Only if you decide to give your app a different name don’t forget to reflect the changes in the `application` file where the database opened by default is name `myshoppinglist`.
The database connectivity is managed via the following environment variables, which you will have predefined by the OpenShift servers at app creation:
dbhost = os.environ['OPENSHIFT_MONGODB_DB_HOST'] dbport = int(os.environ['OPENSHIFT_MONGODB_DB_PORT']) dbuser = os.environ['OPENSHIFT_MONGODB_DB_USERNAME'] dbpass = os.environ['OPENSHIFT_MONGODB_DB_PASSWORD']