Ticket #23160: models_before.py

File models_before.py, 503 bytes (added by whitews@…, 10 years ago)

initial models before renaming

Line 
1from django.db import models
2
3
4class Foo(models.Model):
5 name = models.CharField(unique=True, max_length=32)
6 description = models.TextField(null=True, blank=True)
7 parent = models.ForeignKey(
8 "self",
9 null=True,
10 blank=True
11 )
12
13
14class SomeModel(models.Model):
15 foo = models.ForeignKey(Foo)
16 some_field = models.CharField(max_length=256)
17
18
19class YetAnotherModel(models.Model):
20 foo = models.ForeignKey(Foo)
21 another_field = models.BooleanField(default=True)
Back to Top