Ticket #11761: model.py

File model.py, 1.3 KB (added by Dmitry Shevchenko, 15 years ago)

model, if that helps?

Line 
1class Item(models.Model):
2 item_type = models.CharField(choices=ITEMS, max_length=50)
3 search_data = models.CharField('Searchable data',
4 max_length=search_data_size,
5 blank=True,
6 db_index=True,
7 help_text='The data that will be indexed for search')
8
9 raw_title = models.CharField(max_length=550,
10 blank=True,
11 help_text='The canonical title for this Item')
12
13 title = models.CharField(max_length=255, db_index=True, blank=True)
14 prefix = models.CharField(max_length=20, blank=True)
15 subtitle = models.CharField(blank=True, max_length=255)
16
17
18
19 # who owns this item?
20 owners = models.ManyToManyField(Member, null=True, through='LibraryItem', related_name="library_items")
21
22 # interface objects when dealing with amazon items mixed in with local items
23 amazon_item = False
24 amazon_editions = []
25
26 # meta
27 slug = models.SlugField(max_length=255, blank=True, unique=False)
28 date_added = models.DateTimeField(auto_now_add=True, editable=False)
29 date_updated = models.DateTimeField(auto_now=True, editable=False)
30 added_by = models.ForeignKey(Member, blank=True, null=True, related_name="items_added")
Back to Top