How to Deploy a Django Application to Heroku with Git CLI

Introduction Heroku is a cloud platform that provides hosting services. It supports several programming languages including PHP, Node.js, and Python. It is Platform-as-a-Service (PaaS) which allows you to manage website applications while it takes care of your servers, networks, storage and other cloud components. In this article, we’ll take a look at how to deploy a Django application to Heroku, using Git. You can follow the same steps, and deploy the application from GitHub, if it’s hosted there. Prerequisites Below […]

Read more

Serving Static Files in Python With Django, AWS S3 and WhiteNoise

Introduction Websites generally need additional files such as images, CSS, and JavaScript files that are necessary to render complete web pages in a browser. In small projects, we can work our way around by providing absolute paths to our resources or by writing inline CSS and JavaScript functions in the HTML files. This is not only against the best coding practices but it also gets tricky when we are handling bigger projects, especially with multiple applications. In Django, the files […]

Read more

Building a GraphQL API with Django

Introduction Web APIs are the engines that power most of our applications today. For many years REST has been the dominant architecture for APIs, but in this article we will explore GraphQL. With REST APIs, you generally create URLs for every object of data that’s accessible. Let’s say we’re building a REST API for movies – we’ll have URLs for the movies themselves, actors, awards, directors, producers… it’s already getting unwieldy! This could mean a lot of requests for one […]

Read more

Asynchronous Tasks in Django with Redis and Celery

Introduction In this tutorial I will be providing a general understanding of why celery message queue’s are valuable along with how to utilize celery in conjunction with Redis in a Django application. To demonstrate implementation specifics I will build a minimalistic image processing application that generates thumbnails of images submitted by users. The following topics will be covered: The code for this example can be found on GitHub along with installation and set up instructions if you just want to […]

Read more

Using Django Signals to Simplify and Decouple Code

Introduction Systems are getting more complex as time goes by and this warrants the need to decouple systems more. A decoupled system is easier to build, extend, and maintain in the long run since not only does decoupling reduce the complexity of the system, each part of the system can be managed individually. Fault tolerance has also enhanced since, in a decoupled system, a failing component does not drag down the entire system with it. Django is a powerful open-source […]

Read more

Uploading Files to AWS S3 with Python and Django

Introduction In the quest to build more interactive websites, we don’t only relay information to users but also allow them to upload data of their own. This opens up more opportunities and more ways that our websites can serve the end-users. By allowing users to upload files, we can allow them to share photographs, videos, or music with others or back them up for safekeeping. We can also provide the functionality to manage files and convert them into other formats […]

Read more

Working with Redis in Python with Django

Introduction Data is increasingly becoming a valuable commodity in the current era of technology and this necessitates the optimization of storage and access to this data. There are quite a few notable solutions for the storage of data, including Relational Database Management Systems (RDBMS) such as MySQL and PostgreSQL, which store data in a structured format using rows and columns and the relationships within the data. Apart from RDBMS, there are key-value stores that store data based on unique keys […]

Read more

Deploying Django Applications to AWS EC2 with Docker

Introduction In the fast-paced field of web applications, containerization has become not only common but the preferred mode of packaging and delivering web applications. Containers allow us to package our applications and deploy them anywhere without having to reconfigure or adapt our applications to the deployment platform. At the forefront of containerization is Docker, which is a tool that is used to package and run applications in containers that are platform agnostic. Serverless technology is also flourishing in this era […]

Read more

Deploying Django Apps to Heroku from GitHub

Introduction Heroku is a popular Platform-as-a-Service (PaaS) that allows developers to run and deploy applications by availing the infrastructure required in terms of hardware and software. This means that we do not have to invest in the hardware and software needed to expose our applications to end-users and this freedom allows us to concentrate on our business logic instead of deployment. In this post, we will outline how to deploy a simple Django application to a Heroku pipeline. It targets […]

Read more

Flask vs Django

In this article, we will take a look at two of the most popular web frameworks in Python: Django and Flask. Here, we will be covering how each of these frameworks compares when looking at their learning curves, how easy it is to get started. Next, we’ll also be looking at how these two stands against each other with concluding by when to use one of them. Getting Started One of the easiest ways to compare two frameworks is by […]

Read more
1 2