class SourceForm(forms.ModelForm):data = forms.CharField(widget=TextInput(attrs={'readonly': True, 'class': 'averageField'}))class Meta:model = Sourceclass SourceAdmin(admin.ModelAdmin):form = SourceFormadmin.site.register(Source, SourceAdmin)
I've search for readonly on https://docs.djangoproject.com/search/?q=readonly&release=7 but did not found anything. Also searching manually in https://docs.djangoproject.com/en/dev/ref/forms/widgets/ didn't bring anything up. Can someone tell me where I'm going wrong please.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment