Categories
django Multi-tenancy

Functional Tests with Django Tenant Schemas and Selenium

On my journey of adding multi-tenancy to my app, I have used django-tenant-schemas and the testing utilities it provides to make my unit tests work with the tenants or main site. However the functional tests is another kettle of fish as there is not utility to use for them. Functional Tests From the django docs […]

Categories
postgres

Postgres and Django Case Sensitivity

Postgres queries are CaSeSensitivE unlike in MySQL. When a simple Model.objects.get(field=’hello’) would get the record. Using a postgres db you would need to use field__iexact=’hello’ Even unique doesn’t work with different cases with standard postgres. That is why django has the CIText Mixin and postgres has the citext extension. Could be a feature not a […]

Categories
django

Converting a Single Serving Django Application into Saas

I built a time tracking, leave application and billing application with django, called crowdminder. The product was created in partnership with a consulting company, they paid me and I developed it for them while retaining co-ownership. I have seen that they have benefited from this simple application and know that many other consulting companies in […]

Categories
Capitalism

A Summary of Free To Choose – Milton Friedman

Introduction Adam Smith in the Wealth of Nations: An inidividual who intends only his own gain is led by an invisible hand…by pursuing his own interest he frequently promotes that of society more effectually than when he really intends to promote it. I have never known much good done by those who affected to trade […]

Categories
django

Wrangling with Django’s DecimalField and representations

I’ve been building an application that needs precicion as it is dealing with money, finance and trading. For these tasks there is a special datatype called decimal.Decimal that python has built in. It has many advantages but has a few disadvantages when displaying the decimal to the user. The trailing zeroes are shown (which is […]