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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -