comparison user_photos/models.py @ 1206:02181fa5ac9d modernize tip

Update to Django 1.9.
author Brian Neal <bgneal@gmail.com>
date Wed, 22 Jan 2025 17:58:16 -0600
parents b6e98717690b
children
comparison
equal deleted inserted replaced
1205:510ef3cbf3e6 1206:02181fa5ac9d
8 8
9 9
10 class Photo(models.Model): 10 class Photo(models.Model):
11 """This model represents data about a user uploaded photo.""" 11 """This model represents data about a user uploaded photo."""
12 user = models.ForeignKey(settings.AUTH_USER_MODEL, 12 user = models.ForeignKey(settings.AUTH_USER_MODEL,
13 related_name='uploaded_photos') 13 related_name='uploaded_photos',
14 on_delete=models.CASCADE)
14 upload_date = models.DateTimeField() 15 upload_date = models.DateTimeField()
15 url = models.URLField(max_length=200) 16 url = models.URLField(max_length=200)
16 thumb_url = models.URLField(max_length=200, blank=True) 17 thumb_url = models.URLField(max_length=200, blank=True)
17 signature = models.CharField(max_length=32, blank=True, db_index=True) 18 signature = models.CharField(max_length=32, blank=True, db_index=True)
18 19