Setting up a Django super user may be a requirement in your test setup code. The commands used to create users are interactive by default and unfortunately do not allow you to pass in the user’s password as an argument or a flag on the command line. This is a security measure, but it isn’t …
Python
Encryption using Python and AWS
In this post I’ll show you how to encrypt and decrypt strings using the AWS Encryption SDK and AWS KMS. Step 1: Install the AWS SDK for Python and the Encryption SDK You’ll need boto3 to create a Master Key programmatically and the aws-encryption-sdk for encrypting and decrypting data. Step 2: Add AWS credentials to …
Setting up Django for Deployment: Nginx

This post explains how to install and setup nginx as a reverse proxy to gunicorn and web server to serve static files in Django.
Setting up Django for Deployment: Gunicorn
Web Servers like Apache or NGINX are great for handling HTTP requests. Unfortunately,they typically cannot communicate with Python applications directly. That is where gunicorn comes in.
Learn how to install, configure and run gunicorn with Django in this article.
How to flatten a list of lists in Python
In this post, I cover a couple of ways to flatten lists of lists or lists of mixed data in standard Python and 3rd party libraries such as Django, Pandas and Matplotlib.
How to use Postman to authenticate to Django Rest Framework
Authenticating with Django REST APIs using HTTP Client
How to use Django with multiple databases
Have you ever wondered if it is possible to connect Django to more than one database at a time? Read this post to find out how.
Dealing with the Type Error: ObjectId(”) is not JSON serializable error when working with MongoDB
Learn how to serialize MongoDB ObjectId data types in Python.
How to add CORS Headers to Django responses
How to add CORS headers to a Django Application
Django Templates
A brief introduction into the Django Template Language.