Django writing custom model fields

The list of methods below is in approximately decreasing order of importance, so start from the top. So Hand objects can be saved to text or character columns in the database. No matter which database djanbo we are using, this will mean that migrate and other SQL commands create the right column fislds for storing a string. Xjango up to you whether you want your moddel to be more csutom about the business plan for a garden service company django writing custom model fields select, or to use the simpler, more permissive behavior of the current fields. In order to use the Hand class in our models, we do not have to change this class at all. This might require you to write a custom form field and even a form widget. They just pass all the options to the parent class and then don't use them later on. Our class looks something like this:. We did this recently for one of our larger, long-term client projects at Caktus, and here's an outline of how we'd recommend tackling this issue: First, assess any third party apps that you use to make sure they either don't have any references to the Django's User model, or if they do, that they use Django's generic methods for referencing the user model. If this is given, the default form widget will be a select box instead of the standard text field and will limit choices to the choices given.