[ecidadania-dev] Keeping checks in models

  • From: Shaumik Daityari <sdaityari@xxxxxxxxx>
  • To: ecidadania-dev@xxxxxxxxxxxxx
  • Date: Wed, 3 Apr 2013 13:31:14 +0530

While working for ticket #29, I noticed something that can be improved.

I have created a ticket for the same[0].

I have also seen more such cases, which might need modification. I mean in
place of writing checks in the views or the ajax functions, we can have
cleaned data by adding a function clean(self) in the model. In that way, we
can also prevent people making mistakes while adding data through the
django admin.

I am willing to make these changes (would hardly take a day). I would first
list the models where I would be adding this. Let me know if I should
proceed.

[0] http://code.ecidadania.org/ticket/43

-- 
Shaumik Daityari,
Integrated M. Tech. (3rd year),
Geological Technology,
Department of Earth Sciences,
Indian Institute of Technology, Roorkee,
Uttarakhand

Other related posts: