Skip to content

Commit

Permalink
Fix: timeside.server - limit the CharField length and use UUIDField
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasfillon committed Sep 15, 2015
1 parent 12bc23f commit 96a87da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions timeside/server/models.py
Expand Up @@ -37,6 +37,8 @@
from django.db.models.signals import post_save, pre_save
from django.conf import settings

from django_extensions.db.fields import UUIDField

app = 'timeside'

processors = timeside.core.processor.processors(timeside.core.api.IProcessor)
Expand Down Expand Up @@ -106,7 +108,7 @@ class BaseResource(models.Model):
date_added = models.DateTimeField(_('date added'), auto_now_add=True)
date_modified = models.DateTimeField(_('date modified'), auto_now=True,
null=True)
uuid = models.CharField(_('uuid'), unique=True, blank=True, max_length=255)
uuid = UUIDField(_('uuid'), unique=True, blank=True)

class Meta(MetaCore):
abstract = True
Expand All @@ -119,7 +121,7 @@ def save(self, **kwargs):

class DocBaseResource(BaseResource):

title = models.CharField(_('title'), blank=True, max_length=512)
title = models.CharField(_('title'), blank=True, max_length=256)
description = models.TextField(_('description'), blank=True)

def __unicode__(self):
Expand Down

0 comments on commit 96a87da

Please sign in to comment.