I want to create an app that stores bills for me. Since I don’t have fixed prices for anything there is no need to store my services in an extra model. I just want to store data pairs of “action” and “price” to print them out nicely in a table.
Is there something in django that can help me with that task or should I just put all data pairs together in a textfield and explode it every time i want to use it ?
The number of data pairs per bill is not fixed. Data pairs are used only in one bill, so i don’t want an extra table.
Instead of a plain
TextFieldyou should look at field types that are better suited for storing structured data: In addition to Acorn’s suggestion (django-hstore) aJsonFieldor aPickleFieldmight be suitable (and more portable) solutions for your use case.