Categories
django

Django Admin: Speed up Change List and Item Change Views

It was noticed on a django site that made use of django.contrib.admin that page loads were getting slow. Lots of data had been added (about 77MB worth, tables with more than 10000 records and up as well as a number of joins). A great tool for these situations is a profiler. Django-debug-bar is a easy […]

Categories
django IAM Integration Keycloak OAuth

Best Django Openidc Package

I think we know the security benefits and the development benefits of using a delegated authentication protocol like OpenIDC or SAML. However, actually doing the integration in the application can be difficult at times. There is a lack of documentation and guidance on the best modules or packages to use for the various frameworks. In […]

Categories
django

Displaying a network chart graph diagram on a Django site

There is often a case for improving the understanding of things with visualisations. Python provides a number of libraries to create great visualisations – however they often focus on a data science approach – scripts and jupyter notebooks. What we want is the visualisations to be easily accessible through a django website. That is what […]

Categories
django

How to fix Django OperationalError /admin/auth/user/add/ SAVEPOINT …_x1 does not exist

This is a weird one, an error I had never got until I used an external MySQL (Maria) DB Instance with Django. The steps to recreate this error would be: As an Admin try and add another user from the admin section You will get an error like this: OperationalError /admin/auth/user/add/ error(1305, 'SAVEPOINT s139787825936192_x1 does […]

Categories
django django OAuth python Security

Using django-oauth-toolkit for Client credentials Oauth Flow

I’ve been wanting to secure my api – so unidentified and unathorized parties cannot view, update, create or delete data. This api is internal to the company and will only be used by other services – in other words no end users. Hence the delegation of authorization need not happen and the services will be […]