Hello all, i am very new to django. my model class is as like below.

class APIEntry(models.Model):
    version = models.ForeignKey(Version)
    name=models.CharField(max_length=20,unique=True)
    url=models.URLField()
    mimetype=models.CharField(max_length=20,default='application/json')
    method=models.CharField(max_length=50)
    content=models.TextField()
    isFile=models.BooleanField(help_text = "Is this API has the file ?")
    file=models.FileField(upload_to='.')

By default the last field file upload should be disabled....when ever the user select/checked the isFile boolean field then the file field should be automatically enable. Can anybody suggest me how to implement this.

Thanks in advance

asked 17 Aug '13, 06:21

navula's gravatar image

navula
111
accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×1
×1
×1

Asked: 17 Aug '13, 06:21

Seen: 712 times

Last updated: 17 Aug '13, 06:21

powered by OSQA