Mercurial > public > sg101
diff news/migrations/0001_initial.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 | ec28e9d1e82a |
children |
line wrap: on
line diff
--- a/news/migrations/0001_initial.py Sat Jan 04 21:34:31 2025 -0600 +++ b/news/migrations/0001_initial.py Wed Jan 22 17:58:16 2025 -0600 @@ -41,8 +41,10 @@ ('update_date', models.DateTimeField(db_index=True, blank=True)), ('priority', models.IntegerField(default=0, db_index=True, blank=True)), ('meta_description', models.TextField(blank=True)), - ('category', models.ForeignKey(to='news.Category')), - ('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ('category', models.ForeignKey(to='news.Category', + on_delete=models.CASCADE)), + ('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL, + on_delete=models.CASCADE)), ], options={ 'ordering': ('-date_submitted',), @@ -64,8 +66,10 @@ ('update_date', models.DateTimeField(db_index=True, blank=True)), ('priority', models.IntegerField(default=0, db_index=True, blank=True)), ('meta_description', models.TextField(blank=True)), - ('category', models.ForeignKey(to='news.Category')), - ('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ('category', models.ForeignKey(to='news.Category', + on_delete=models.CASCADE)), + ('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL, + on_delete=models.CASCADE)), ], options={ 'ordering': ('-date_submitted',),