Hi, I'm Harlin and welcome to my blog. I write about Python, Alfresco and other cheesy comestibles.

Python - A Simple Method for Refactoring Your Code For Extensibility

I am talking to the beginning Python programmer here. Or to someone who has avoided object oriented programming and has used procedural programming. Or to someone who mainly uses Python to write scripts -- though you can definitely use the ideas I have here for bigger applications. In fact, you will ...

Read More

Python - Intro to web.py

Intro to web.py

I was first introduced to web programming some time around 2003. At the time, the hot language/platform was PHP. I had begun to learn Python because I was interested in writing a monitoring tool which Python seemed to be well suited for. At that time ...

Read More

Python + Gunicorn + Apache - A Simple and Performant Method to Deploy your Django Projects

Note: This is not a discussion about Apache being better than its competitors. It's only about how to set up Django, Gunicorn and Apache.

I used to host my Django projects with mod_wsgi and Apache. It worked well for most things. Some of its advantages are that it's ...

Read More

Python + Django How to Test Views

Today I wanted to go over how to use Django's web client testing features. It's a fairly simple thing to grasp how to use Python's unit testing to test functions and procedures but I am finding that a lot of Django beginners are not sure how they ...

Read More

Python - How to Set Up a Simple HelloWorld Django App

The purpose of this post is to provide a set of instructions to create a simple helloworld app in Django. This app can then be used for testing purposes in other posts I've written.

Set up virtual environment:

# pyenv global 3.6.4
# pyenv virtualenv deploy_django
# pyenv local deploy_django ...

Read More

Python - Simplest Django Tutorial Ever

I wanted to write up a very simple Django tutorial that will show you the workflow behind creating a very simple CRUD app. The workflow is repeatable of course. You can use it to build more functional apps.

The steps below will show you how to build a simple ToDo ...

Read More

Python String Formatting - More than One Way to Do It

By now, you've probably seen one of the guiding principles of the Python programming language when running "import this" in your interpreter.

Python's mantra on ways to get things done in the languge has been: "There should be one-- and preferably only one --obvious way to do it ...

Read More

Understanding and Handling Bytes and Strings Issues When Converting to Python 3

I talk a good bit about CMIS (Apache Chemistry) and Python on this site. In case you're not familiar, CMIS (Content Management Interoperability Services) is a standard enabling information and content sharing between Content Management Systems. It can be used with a number of different CMS (or ECM if ...

Read More