Python – Creating a Virtual Environment for Python2 or Python3

1. Install virtualenv. 2. cd into your project directory. 3. Create virtual environment. This will create venv directory under your project. 4. Activate virtualenv Done. Install whatever package you need for your project using More… If you are creating a virtual environment for python3, and you have python3 at the system level, simply replace step… Continue reading Python – Creating a Virtual Environment for Python2 or Python3

Saving SSH session in Terminal

For Windows users, use PuTTY. For Mac users, locate to .ssh folder which is under the root folder and create a file named “config” – you can simply use TextEdit. Note: since .ssh folder is hidden, you can type the below command to view hidden files. In your “config’ file, write and save the server… Continue reading Saving SSH session in Terminal

How to create a blog comment system with webapp2 (on Google App Engine) – Part 2

From the previous post, I went over storing comments into db model and this post will cover how to rendered the store comments associated with questions that have those comments. It was actually simpler than I thought it would be. See the below code. What I did here is that I fetched the question entity… Continue reading How to create a blog comment system with webapp2 (on Google App Engine) – Part 2

Google App Engine (with Jinja2 and webapp2) – allow hyperlinks in your textarea using CKEditor

My webapp allows users to submit questions and answer questions. I wanted to allow users to be able to submit hypelinks as well as format their contents to make it more visual and informative. I discovered that I needed to use what’s called the “rich-text editor” which allows users to edit their contents within web… Continue reading Google App Engine (with Jinja2 and webapp2) – allow hyperlinks in your textarea using CKEditor

Google App Engine – Fix an error when adding another property to datastore (webapp2)

As mentioned in my previous post, I am currently developing a simple Q&A website. I was able to display a list of questions submitted by users but I also wanted to display who wrote the post on my front page . I simply added another property “firstName” of the user to my db model in… Continue reading Google App Engine – Fix an error when adding another property to datastore (webapp2)

Create a link to a list of post titles with webapp2 and Jinja2 (Google App Engine)

After taking an online course on Udacity, I started developing a simple Q&A website that allows users who are logged in to post questions from a simple html input form. Once a user submits a question, it then stores the question in the Google DB data store. Most of the below codes would be a review… Continue reading Create a link to a list of post titles with webapp2 and Jinja2 (Google App Engine)