title: django model filefield having db error
body: <p>I am using django 1.4 and using django model's filefield to upload some document via modelform. I am having following issues:</p>
  
  <p>When I submit form it says: </p>
  
  <pre><code>Data truncated for column 'file_name' at row 1
  </code></pre>
  
  <p>Following is my model for this:</p>
  
  <pre><code>class App(models.Model):
      user_name=models.CharField(max_length=50)
      email=models.CharField(max_length=50)
      status=models.CharField(max_length=10,choices=APPLICATIONSTATUSCHOICE)
      archived=models.BooleanField()
      mark_spam=models.BooleanField()
      date=models.DateField()
      file_name=models.FileField(upload_to=PATH+"/")
      def getPath(self):
          return PATH
      def __unicode__(self):
          return self.user_name
      def send_email(self):
          pass
  </code></pre>
  
  <p>Here is the code for model form:</p>
  
  <pre><code>class AppForm(ModelForm):
      class Meta:
       model=App
           exclude=('status','archived','mark_spam')
  
  email=forms.EmailField()
  
      def save(self,commit=True):
           app=super(AppForm,self).save(commit=False)
       app.status='sent'
           app.save()
  </code></pre>
  
  <p>Also it is storing file with its original name,can I have it with something unique name as I am from PHP background and in PHP I normally save it like  <code>&lt;mysql auto id&gt;.&lt;filextension&gt;</code>, so how can I do it in django. My first impression was that all this will be automatically done via django while it just save it with name of its own choice but I need to save names into db also so want to name them according to my choice. How can it be done and what is problem in my code that is giving above mentioned error?</p>