Thursday, July 5, 2012

Error models with control data

I'm working on writing the models.py file, and I need some controls to perform the automatic compilation of some fields.

MOTIVOINGRESSO = (
         
(u'sequestro ', u'sequestro'),
         
(u'fermo ', u'fermo'),
         
(u'confisca final ', u'confisca final'),
         
(u'cambio custodian ', u'cambio custodian'),
     
)
     motivo_ingresso
= models.CharField (max_length = 50, choices = MOTIVOINGRESSO)



FERMO = (
         
(u'30 ', u'30'),
         
(u'60 ', u'60'),
         
(u'90 ', u'90'),
         
(u'180 ', u'180'),
         
(u'1 month ', u'1 month'),
         
(u'3 months, 'u'3 months'),
         
(u'indeterminato ', u'indeterminato'),
     
)
     durata_in_giorni_del_fermo
= models.CharField (max_length = 20, choices = STOPPED, blank = True)

enter code here

If the administrator the choice click 'sequestro', in durata_in_giorni_del_fermo will automatically selected 'indeterminato'. Should I report the values ​​entered? or machine cycles if within the models?

Any Ideas?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/mQs8UKm7cGIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment