On Monday, August 1, 2016 at 5:59:17 PM UTC+5:30, Michal Petrucha wrote: > > On Mon, Aug 01, 2016 at 05:09:37AM -0700, graeme wrote: > Either way is fine, using models.IntegerField > and forms.IntegerField just makes it more obvious what kind of > IntegerField it is you're referring to. > I always have forms and models defined in separate files so it is a non-issue. If it is in models.py it is models.IntegerField etc.
> > The only thing I can think of is that you might sometimes want to > define your own model field, in which you override the default > formfield; in that case, you'd need to have both model fields and form > fields in the same module, and it would be quite chaotic and unclear > which one you're referring to if you cherry-picked classes to import > instead of just importing the modules. > Good point. In that particular file I would import models and forms for clarity. Probably put that in a separate file and import just my custom model field into models.py > > Cheers, > > Michal > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/51621217-b1ac-4d28-9188-9e807be30c51%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.