Personal Blog in Google Cloud
What is it?
A personal blog for posting content with commenting and score system. Built using Python for the backend, and runs on Google App Engine. The Python server uses jinja2 for HTML templating and stores all site data in Google Cloud Datastore.
- Download and install Python 2.7
- Download and install Google App Engine SDK for Python
- Optionally, see this quickstart guide
- Sign Up for a Google App Engine Account
- Create a new project in Google’s Developer Console using a unique name
- Follow the App Engine Quickstart to get an app up and running
- Clone this repository into Google's repository using these instructions
Modify the site as needed.
front.html in the
templates directory is inherited/extended by all other HTML templates. Edit this file to change the page header and navigation.
Styling can be changed using CSS in file
style.css in the
Be sure to change the value of SECRET, which is used for hashing. This can be found on line 16 of
SECRET = "LVFuBg9EM8Bq3cd992Tb5g01Uh30GCV2"
To run the site on your local machine, run this command from a Terminal within the application's directory.
$ dev_appserver.py .
The site will then be avialible at
The local Google Datastore can be viewed and edited using this address
All valid paths can be used and edited at the bottom of
app = webapp2.WSGIApplication([("/", BlogFront), ("/blog/?", BlogFront), ("/blog/([0-9]+)", PostPage), ("/blog/newpost", NewPost), ("/blog/signup", Signup), ("/blog/login", Login), ("/blog/logout", Logout)], debug=True)
Deploying to Cloud
Modified app files can be deployed to Google Cloud using:
$ gcloud app deploy
- Add user roles so only some users can post articles
- Add like/dislike tracking to block multiple likes/dislikes
- Add user administration functionality