¡@

Home 

python Programming Glossary: itemform

In a django form, How to make a field readonly (or disabled) so that it cannot be edited?

http://stackoverflow.com/questions/324477/in-a-django-form-how-to-make-a-field-readonly-or-disabled-so-that-it-cannot-b

max_length 200 added_by models.ForeignKey User class ItemForm ModelForm class Meta model Item exclude 'added_by' def new_item_view.. def new_item_view request if request.method 'POST' form ItemForm request.POST #validate and save else form ItemForm #render the.. form ItemForm request.POST #validate and save else form ItemForm #render the view Can class ItemForm be reused What changes would..