Exemplo n.º 1
0
from books.models import Author, AuthorForm

of = open('do.html','w')
author = Author.objects.get(pk=1)
print '\n'
f2 = AuthorForm({'first_name':'Foo','email':'rivuletish'},instance=author)

print >> of,'<table>'
print >>of,f2.as_table()
print >> of,'</table>'

of.close()



print f2['first_name']
print f2['email'].errors