We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Building a custom model field from the ground up

Formal Metadata

Title
Building a custom model field from the ground up
Title of Series
Number of Parts
32
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
A comprehensive guide on building custom models fields in Django. Including descriptors, lookups, expressions and many more. Often you need to map domain entities onto your application and store them in a database. Django provides you with a very extensible API that allows you to integrate domain entities with ORM seamlessly. This talk will walk through all essential steps in building a Money instances support for Django from the ground, based on real-life examples taken from django-money library. Here is an overview of the talk structure: Historical notes on django-money project. Implementing a field for Money Connecting py-moneyed with Django. Map Money to Model What field to choose? Implicit currency field How descriptors could help here? Querying MoneyField Designing the API Lookup API vs. old style model managers surgery Expressions. Enhancing Money class Extras: Integrating Django admin. Utilizing AppConfig.ready Serialization Validators Migrations. Deconstruction & backends differences Testing