Relative Content

Tag Archive for pythondjangodjango-modelsdjango-forms

Can non-displayed fields of a Django model be altered during custom form validation but before committing model’s data?

for the last few weeks I’ve been working on my first Django project: a database to register all incoming orders from Customers for a generic enterprise. Let’s assume that each one of the sale reps could be assigned to a specific Customer for a whole natural year and assignments may vary from one year to another (i.e. agent A assigned to customer A in 2024, whereas in 2025, agent B might be in charge of customer A).

Custom MultiInput Model Field in Django

I’m trying to create a custom field for volume made up of 4 parts (length, width, height and units). I’m thinking that extending the models.JSONField class makes the most sense.