Categories
django Keycloak

Using Keycloak as the identity provider for users on django and django-admin

I have used mozilla’s Django OpenID Connect client before, but this time I found something called Django-AllAuth. Django-Allauth seems packed full of features and is well maintained. So I am going to test whether I can use it with Keycloak as the identity provider for users on django and django admin. Initial Setup With your […]

Categories
django GNU/Linux

Upgrading SQLite on CentOS to 3.8.3 or Later

Let me guess you are using django and may have just done an upgrade to django 2.2.x or 3.x in order to stay up to date and have the latest security updates. However you now have this exception to deal with… ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17) This means you will need […]

Categories
django python

Adding Time taken to respond to a request in the header of a Django Rest Framework Response

Ever wanted to add the time taken for a response to your API, so the client knows how long the server took to send a response? I first noticed this cool feature on AWX, a management platform for ansible playbooks. Their response headers looked like this: So I checked out their source code and copied […]

Categories
DevOps django

Authenticated Functional Tests with Selenium and Django

In the Test Driven Development Book for Python and Django by Harry Percival called Obey The Testing Goat, there is a chapter about enhancing the functional test base class and adding pre-authentication so you don’t need to login via the login screen with Selenium. It uses a custom Email Authentication Backend, but I needed to […]

Categories
Database DevOps django

Deploying a django app with dedicated web and db servers

One of the many architectural decisions that will start to impact you when you get to a level where you need to scale is splitting you db and app. Typically we start on a budget and have to share resources but ideally you want to start out separate. The reasons is that the db server […]