Django is shipped with some useful application, also there are lots of third party re-usable application written for Django. Sometime you need to modify or customize these applications(Models of application) to meet your software requirements. One of the usual solution is adding a Model class to have a one-to-one relationship with the third party Models. This solution has some disadvantages such as having more tables and classes which can highly adversely affect database performance, scalability and add more complexity to the software development. I think of another solution to this problem. I used Django South along with monkey patching of third party Model classes. I added a field to Django user class. Here is a walk through over this approach. 1. Add an application: python manage.py startapplication userpatch 2. Add the following code to add the new field to the user class from django.db import models from django.contrib.auth.models import User ...
In essence, Code Illusion is a developer’s personal journal focused on real-world development problems, experiments, and solutions—often with a thoughtful or narrative bent rather than purely tutorial-style content. It features technical posts and reflections on topics like Python, Django, HTML, JavaScript, and ReactJS, as well as practical tips and insights into tools, frameworks, and development workflows.