Ticket #23160: models_after.py

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

models.py after renaming model

Line 
1from django.db import models
2
3
4class Bar(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(Bar)
16 some_field = models.CharField(max_length=256)
17
18
19class YetAnotherModel(models.Model):
20 foo = models.ForeignKey(Bar)
21 another_field = models.BooleanField(default=True)
Back to Top