If I have a model (extract):
class Coupon(models.Model):
image = models.ImageField(max_length=64, null=True, upload_to=\"couponimages\")
<
I think the best way to achieve that is to create a widget that renders nothing:
class NoInput(forms.Widget):
input_type = "hidden"
template_name = ""
def render(self, name, value, attrs=None, renderer=None):
return ""
class YourForm(forms.Form):
control = forms.CharField(required=False, widget=NoInput)
This way you can still use {{form}} in your template.