title: value too long for type character varying(100)----recently switched database, didn't do anything in db
body: <p>I recently switched to postgresql, I thought everything worked fine until I realized when I make post I get value too long for type character varying(100). Now I googled it, and saw some similar questions but when I tried some solutions there none of them worked. I will explain why my question is different in my opinion. I have this code in models.py</p>
  
  <pre><code>class Post(models.Model):
      url = models.URLField(max_length=250, blank=True, null=True)
  
      slug = models.CharField(max_length=255, unique=True)
      objects = models.Manager()    
  
  @property
  
  def save(self, *args, **kwargs):
      self.slug = uuslug(self.title, instance=self, max_length=255)
      super(Post, self).save(*args, **kwargs)
  </code></pre>
  
  <p>As I saw some recommended solutions, I did try changing my max_length to 100. I have no idea why this is happening, I don't have anything in db. I recently switched to postgresql. Can you help me why this error is occurring and how I can fix it? should I move away from uuslug?</p>
  
  <p>Full model</p>
  
  <pre><code>.
  class Category(models.Model): 
  
      name = models.CharField(max_length=128, unique=True)
      description = models.TextField(verbose_name=('describe'))
      author = models.ForeignKey(settings.AUTH_USER_MODEL)
  
  
      def __unicode__(self): 
          return self.name
  
      def get_absolute_url(self):
          return "/category/%s/" %self.name
  
  def my_handler(sender, instance, created, **kwargs):
      action.send(instance.author, verb='following', target=Category)
  post_save.connect(my_handler, sender=Category)
  
  
  class Post(models.Model):
      category = models.ForeignKey(Category, verbose_name=('community'))
      pub_date = models.DateTimeField(auto_now_add = True)
      url = models.URLField(max_length=250, blank=True, null=True)
      video = EmbedVideoField(verbose_name='link',help_text="Youtube", blank=True, null=True) 
  
      title = models.CharField(max_length = 50)
      moderator = models.ForeignKey(User)
      views = models.IntegerField(default=0)
      slug = models.CharField(max_length=255, unique=True)
      objects = models.Manager()            # default manager
      content = RichTextUploadingField(config_name='default')
      rank_score = models.FloatField(default= 1)
      image = models.ImageField(upload_to='images',blank=True, null=True)
      thumbnail = models.ImageField(upload_to='images', blank=True, null=True)
  
  
      @property
      def domain(self):
          long_url = urlparse(self.url).netloc if self.url else "be kind to one another"
          return long_url.split('.', 1)[1] if long_url.split('.', 1)[0] == 'www' else long_url
      def save(self, *args, **kwargs):
          self.slug = uuslug(self.title, instance=self, max_length=255)
          super(Post, self).save(*args, **kwargs)
      def __unicode__(self):
          return self.title 
  </code></pre>
  
  <p>Here's full Traceback</p>
  
  <p>T</p>
  
  <pre><code>raceback:
  File "env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "env/local/lib/python2.7/site-packages/django/views/generic/base.py" in view
    71.             return self.dispatch(request, *args, **kwargs)
  File "env/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
    34.             return bound_func(*args, **kwargs)
  File "env/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
    22.                 return view_func(request, *args, **kwargs)
  File "env/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
    30.                 return func.__get__(self, type(self))(*args2, **kwargs2)
  File "ebagu/main/views.py" in dispatch
    191.      return super(PostCreateView, self).dispatch(request, *args, **kwargs)       
  File "env/local/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
    89.         return handler(request, *args, **kwargs)
  File "env/local/lib/python2.7/site-packages/django/views/generic/edit.py" in post
    249.         return super(BaseCreateView, self).post(request, *args, **kwargs)
  File "env/local/lib/python2.7/site-packages/django/views/generic/edit.py" in post
    215.             return self.form_valid(form)
  File "ebagu/main/views.py" in form_valid
    186.          self.object.save()
  File "ebagu/main/models.py" in save
    66.       super(Post, self).save(*args, **kwargs)
  File "env/local/lib/python2.7/site-packages/django/db/models/base.py" in save
    734.                        force_update=force_update, update_fields=update_fields)
  File "env/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
    762.             updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "env/local/lib/python2.7/site-packages/django/db/models/base.py" in _save_table
    846.             result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "env/local/lib/python2.7/site-packages/django/db/models/base.py" in _do_insert
    885.                                using=using, raw=raw)
  File "env/local/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method
    127.                 return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "env/local/lib/python2.7/site-packages/django/db/models/query.py" in _insert
    920.         return query.get_compiler(using=using).execute_sql(return_id)
  File "env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
    974.                 cursor.execute(sql, params)
  File "env/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
    79.             return super(CursorDebugWrapper, self).execute(sql, params)
  File "env/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
    64.                 return self.cursor.execute(sql, params)
  File "env/local/lib/python2.7/site-packages/django/db/utils.py" in __exit__
    97.                 six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "env/local/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
    64.                 return self.cursor.execute(sql, params)
  
  Exception Type: DataError at /add_post/
  Exception Value: value too long for type character varying(100)
  </code></pre>