Changes between Version 14 and Version 15 of DynamicModels


Ignore:
Timestamp:
Jun 28, 2008, 4:34:48 PM (16 years ago)
Author:
springmeyer
Comment:

changing more instances of maxlength to max_length

Legend:

Unmodified
Added
Removed
Modified
  • DynamicModels

    v14 v15  
    114114#!python
    115115>>> fields = {
    116 ...     'first_name': models.CharField(maxlength=255),
    117 ...     'last_name': models.CharField(maxlength=255),
     116...     'first_name': models.CharField(max_length=255),
     117...     'last_name': models.CharField(max_length=255),
    118118...     '__str__': lambda self: '%s %s' (self.first_name, self.last_name),
    119119... }
     
    144144
    145145class App(models.Model):
    146     name = models.CharField(maxlength=255)
    147     module = models.CharField(maxlength=255)
     146    name = models.CharField(max_length=255)
     147    module = models.CharField(max_length=255)
    148148
    149149    def __str__(self):
     
    152152class Model(models.Model):
    153153    app = models.ForeignKey(App, related_name='models')
    154     name = models.CharField(maxlength=255)
     154    name = models.CharField(max_length=255)
    155155
    156156    def __str__(self):
     
    176176class Field(models.Model):
    177177    model = models.ForeignKey(Model, related_name='fields')
    178     name = models.CharField(maxlength=255)
    179     type = models.CharField(maxlength=255, validator_list=[is_valid_field])
     178    name = models.CharField(max_length=255)
     179    type = models.CharField(max_length=255, validator_list=[is_valid_field])
    180180
    181181    def get_django_field(self):
     
    192192class Setting(models.Model):
    193193    field = models.ForeignKey(Field, related_name='settings')
    194     name = models.CharField(maxlength=255)
    195     value = models.CharField(maxlength=255)
     194    name = models.CharField(max_length=255)
     195    value = models.CharField(max_length=255)
    196196
    197197    class Meta:
Back to Top