Conventions

Coding Rules

Django models

Example:

class SomeClass(models.Model):
    name = models.CharField(max_length=100, null = False, blank = False, unique=True,
               verbose_name = _(u'name'))
    slug = models.SlugField(max_length=100, null = False, blank = False, unique=True,
               verbose_name = _(u'slug'),
               help_text = (u'Identifier of this object. Only letters, digits and underscore "_" allowed.'))
    text = models.TextField(null = False, blank = True,
               verbose_name = _(u'text'))

    class Meta:
        verbose_name = _(u'some class')
        verbose_name_plural = _(u'some classes')
        ordering = ['name']

    def __unicode__(self):
        return self.name