174 |
174 |
175 |
175 |
176 |
176 |
177 class Collection(models.Model): |
177 class Collection(models.Model): |
178 |
178 |
179 SLIDESHOW = 1 |
179 LIST = 1 |
180 MOSAIC = 2 |
180 MOSAIC = 2 |
181 GEOGRAPHICAL = 3 |
181 SLIDESHOW = 3 |
|
182 GEOGRAPHICAL = 4 |
182 |
183 |
183 PUBLICATION_CHOICES = ( |
184 PUBLICATION_CHOICES = ( |
|
185 (LIST, 'list'), |
|
186 (MOSAIC, 'mosaic'), |
184 (SLIDESHOW, 'slideshow'), |
187 (SLIDESHOW, 'slideshow'), |
185 (MOSAIC, 'mosaic'), |
|
186 (GEOGRAPHICAL, 'geographical') |
188 (GEOGRAPHICAL, 'geographical') |
187 ) |
189 ) |
188 |
190 |
189 |
191 |
190 title = models.CharField(max_length=2048, blank=True, null=True) |
192 title = models.CharField(max_length=2048, blank=True, null=True) |
191 description = models.TextField(blank=True, null=True) |
193 description = models.TextField(blank=True, null=True) |
192 author = models.ForeignKey(User, blank=False, null=False) |
194 author = models.ForeignKey(User, blank=False, null=False) |
193 creation = models.DateTimeField(auto_now_add=True) |
195 creation = models.DateTimeField(auto_now_add=True) |
194 modification = models.DateTimeField(auto_now=True) |
196 modification = models.DateTimeField(auto_now=True) |
195 public = models.BooleanField(null=False, default=True) # Collection is published or not, always published by default |
197 public = models.BooleanField(null=False, default=True) # Collection is published or not, always published by default |
196 publication_type = models.IntegerField(choices=PUBLICATION_CHOICES, default=1) # slideshow, mosaic ou geographical |
198 publication_type = models.IntegerField(choices=PUBLICATION_CHOICES, default=1) # list, mosaic, slideshow or geographical |
197 |
199 |
198 |
200 |
199 |
201 |
200 class CollectionItem(models.Model): |
202 class CollectionItem(models.Model): |
201 |
203 |