Merge pull request #212 from alorence/master

Avoid "RemovedInDjango20Warning: on_delete will be a required arg for ForeignKey in Django 2.0" with recent versions of Django
This commit is contained in:
Dave Hall 2017-07-24 09:59:05 +01:00 committed by GitHub
commit 43e51ce760
2 changed files with 2 additions and 1 deletions

View file

@ -32,7 +32,7 @@ class Migration(migrations.Migration):
('content', models.TextField(blank=True)),
('url', models.CharField(max_length=1000, blank=True)),
('meta_encoded', models.TextField()),
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
('content_type', models.ForeignKey(to='contenttypes.ContentType', on_delete=models.CASCADE)),
],
options={
'verbose_name_plural': 'search entries',

View file

@ -40,6 +40,7 @@ class SearchEntry(models.Model):
content_type = models.ForeignKey(
ContentType,
on_delete=models.CASCADE,
)
object_id = models.TextField()