python - Showing fields with auto_now=True through a forms.ModelForm -
i have modelform following field definition:
updated_at = models.datetimefield("last-modified", auto_now=true)
and when in form:
class meta: model = page fields = ('title', 'views', 'updated_at')
i get: unknown field(s) (updated_at) specified page
exception.
if remove auto_now=true
works don't want that. want display updated_at
in template, not manually editable.
please help.
add editable
param define field:
updated_ad = models.datetimefield('last modefied', auto_now=true, editable=true)
Comments
Post a Comment