Allan James Vestal
unread,Sep 9, 2011, 4:43:13 PM9/9/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hello,
I'm creating a tool that will automate the downloading, processing and
repackaging of data.
The scripting for each data set is composed of two main parts: a
fairly standard models.py file, and a loaders.py file that will
contain all the instructions on how to turn the raw data into what
gets saved. The plan is for the two to be linked: each loader object
will have a Meta class in which the corresponding model will be
declared.
With respect to the data processing, I already have defined a
process_data() method to handle general tasks. But I also want each
field in the model to have a process_<fieldname>() method (so, for
example, I can contain all processing related to field A to the
process_a() method. How would I go about this?
Given a model, I want to be able to create process_<fieldname>()
methods for each field. I know forms have a similar construction with
their clean_<fieldname>() methods. I've been looking at the relevant
parts of the Django source, but can't seem to find where those get
created. Can someone steer me in the right direction?
Thanks in advance.
~Allan