blob: 1babd58cc75ad2b52ba87b2edf10b6ae757c5d9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from tagging.fields import TagField
class Perch(models.Model):
size = models.IntegerField()
smelly = models.BooleanField(default=True)
@python_2_unicode_compatible
class Parrot(models.Model):
state = models.CharField(max_length=50)
perch = models.ForeignKey(Perch, null=True)
def __str__(self):
return self.state
class Meta:
ordering = ['state']
@python_2_unicode_compatible
class Link(models.Model):
name = models.CharField(max_length=50)
def __str__(self):
return self.name
class Meta:
ordering = ['name']
@python_2_unicode_compatible
class Article(models.Model):
name = models.CharField(max_length=50)
def __str__(self):
return self.name
class Meta:
ordering = ['name']
class FormTest(models.Model):
tags = TagField('Test', help_text='Test')
class FormTestNull(models.Model):
tags = TagField(null=True)
|