A basic demo GAE blog application, written in Python using webapp2 framework.
This app is created for FSWDN Udacity course according to this specifications. The idea and the content were inspired by www.catipsum.com.
- User accounts implementation is based on
webapp2_extrasUsermodel (secure sessions, hashed passwords, etc.). - Some advanced features of Jinja2 template engine are being used: marcro, filters.
- All html-forms and some critical URIs are protected against CSRF attacks.
- "Likes" were implemented with AJAX (with fallback to simple html links).
- Trumbowyg WYSIWYG-editor for posts.
- In-place editing for comments.
- Flash messages for users.
- Fancy design (kittens love it).
- Download the SDK from http://code.google.com/appengine/downloads.html
- Unzip the file:
unzip google_appengine*.zip cd google_appengine- run any demo application:
./dev_appserver.py demos/python/guestbook/ - in a browser open http://localhost:8080/ to check it works.
- press Ctrl+C to stop application server.
-
install some dependancies:
sudo apt-get install python-lxml python-jinja2` -
add
google_appenginedirectory to $PATHcd google_appengine; export PATH=$PATH:$(pwd) -
Clone the master branch to any other directory:
git clone https://github.com/sergey-lance/Udacity-FSWDN-MultiuserBlog.git -
cd Udacity-FSWDN-MultiuserBlog -
run the appserver in current directory:
dev_appserver.py . -
in a web-browser open http://localhost:8080/
-
Create a new project, open the Cloud Shell. docs
-
In the Cloud Shell run the following commands (substitute
<your-project-name>with the actual name of your project):
git clone https://github.com/sergey-lance/Udacity-FSWDN-MultiuserBlog/
cd Udacity-FSWDN-MultiuserBlog/
appcfg.py -A <your-project-name> -V v1 update .- Open the URL http://<your-project-name>.appspot.com/blog/ in a browser
-
Create an access key for App Engine default service account and set it's location to environment variable:
export GOOGLE_APPLICATION_CREDENTIALS=/home/me/Downloads/<APP_ID-KEY_ID>.json -
Upload the users.dat, posts.dat and comments.dat to AppEngine:
for file in users.dat posts.dat comments.dat; do appcfg.py upload_data --url=http://APPNAME.appspot.com/_ah/remote_api --filename=${file} --application=s~APPNAME; doneTo dump data from local server use this one:
appcfg.py download_data --url=http://localhost:8080/_ah/remote_api --filename=users.dat --kind=User
...You are free to use this sources as you like, but do not forget about the Udacity Honor Code.