]> git.parisson.com Git - teleforma.git/commitdiff
cleanup fields
authoryomguy <yomguy@parisson.com>
Tue, 16 Oct 2012 15:26:40 +0000 (17:26 +0200)
committeryomguy <yomguy@parisson.com>
Tue, 16 Oct 2012 15:26:40 +0000 (17:26 +0200)
teleforma/fields.py
teleforma/models/core.py

index b50d6d2ddd4a1773c8edfaef60b73bf106f86117..8d54b46660b4ccb06b847df3b8ed636ccf011c02 100644 (file)
@@ -2,13 +2,13 @@
 import django.db.models as models
 from south.modelsinspector import add_introspection_rules
 
+
 class ShortTextField(models.TextField):
 
     def formfield(self, **kwargs):
          kwargs.update(
-            {"widget": Textarea(attrs={'rows':3, 'cols':30})}
+            {"widget": Textarea(attrs={'rows':2, 'cols':40})}
          )
          return super(ShortTextField, self).formfield(**kwargs)
 
-add_introspection_rules([], ["^teleforma\.models\.ShortTextField"])
-
+add_introspection_rules([], ["^teleforma\.models\.ShortTextField"])
\ No newline at end of file
index e80acc928436554892dd3489a2abe36e08072f32..1a89a46d03e17fd99b39fb212d746e85c7c53cc4 100644 (file)
@@ -44,6 +44,7 @@ import datetime
 import mimetypes
 
 from telemeta.models import *
+from teleforma.fields import *
 import django.db.models as models
 from django.db.models import *
 from django.forms import ModelForm, TextInput, Textarea
@@ -77,17 +78,6 @@ STATUS_CHOICES = (
 WEIGHT_CHOICES = get_n_choices(5)
 
 
-class ShortTextField(models.TextField):
-
-    def formfield(self, **kwargs):
-         kwargs.update(
-            {"widget": Textarea(attrs={'rows':2, 'cols':40})}
-         )
-         return super(ShortTextField, self).formfield(**kwargs)
-
-add_introspection_rules([], ["^teleforma\.models\.ShortTextField"])
-
-
 class Organization(Model):
 
     name            = CharField(_('name'), max_length=255)