That's exactly what I'm looking for.
I'll probably try adding that feature to the model base class or as a
mixin.
@classmethod
def get_field_option_by_name(self, fieldname, optionname):
field = self._meta.get_field_by_name(fieldname)[0]
return getattr(fieldname, optionname)
possibly with
On 30 oct, 14:26, Mark Wolgemuth <[EMAIL PROTECTED]> wrote:
> It seems like I'm missing something, but here's what I'm trying to do:
>
> In creating a Form object, I'm setting size limit validation
> (max_length). I'd like to recover the value for that from the
> corresponding Model's Field's ma
It seems like I'm missing something, but here's what I'm trying to do:
In creating a Form object, I'm setting size limit validation
(max_length). I'd like to recover the value for that from the
corresponding Model's Field's max_length. So basically I want a symbol
lookup that will inspect in the
3 matches
Mail list logo