diff --git a/silk/migrations/0001_initial.py b/silk/migrations/0001_initial.py index 5ce2563e..2d4fd52a 100644 --- a/silk/migrations/0001_initial.py +++ b/silk/migrations/0001_initial.py @@ -41,7 +41,7 @@ class Migration(migrations.Migration): ('body', models.TextField(blank=True, default='')), ('method', models.CharField(max_length=10)), ('start_time', models.DateTimeField(db_index=True, default=django.utils.timezone.now)), - ('view_name', models.CharField(db_index=True, blank=True, default='', max_length=300)), + ('view_name', models.CharField(db_index=True, blank=True, default='', max_length=300, null=True)), ('end_time', models.DateTimeField(blank=True, null=True)), ('time_taken', models.FloatField(blank=True, null=True)), ('encoded_headers', models.TextField(blank=True, default='')), diff --git a/silk/models.py b/silk/models.py index 8ddd8fe9..43577cb1 100644 --- a/silk/models.py +++ b/silk/models.py @@ -50,7 +50,7 @@ class Request(models.Model): body = TextField(blank=True, default='') method = CharField(max_length=10) start_time = DateTimeField(default=timezone.now, db_index=True) - view_name = CharField(max_length=300, db_index=True, blank=True, default='') + view_name = CharField(max_length=300, db_index=True, blank=True, default='', null=True) end_time = DateTimeField(null=True, blank=True) time_taken = FloatField(blank=True, null=True) encoded_headers = TextField(blank=True, default='') diff --git a/silk/south_migrations/0001_initial.py b/silk/south_migrations/0001_initial.py index 84dcda29..212385c3 100644 --- a/silk/south_migrations/0001_initial.py +++ b/silk/south_migrations/0001_initial.py @@ -17,7 +17,7 @@ def forwards(self, orm): ('body', self.gf('django.db.models.fields.TextField')(blank=True, default='')), ('method', self.gf('django.db.models.fields.CharField')(max_length=10)), ('start_time', self.gf('django.db.models.fields.DateTimeField')(db_index=True, default=datetime.datetime.now)), - ('view_name', self.gf('django.db.models.fields.CharField')(db_index=True, blank=True, default='', max_length=300)), + ('view_name', self.gf('django.db.models.fields.CharField')(db_index=True, blank=True, default='', max_length=300, null=True)), ('end_time', self.gf('django.db.models.fields.DateTimeField')(blank=True, null=True)), ('time_taken', self.gf('django.db.models.fields.FloatField')(blank=True, null=True)), ('encoded_headers', self.gf('django.db.models.fields.TextField')(blank=True, default='')), @@ -153,4 +153,4 @@ def backwards(self, orm): } } - complete_apps = ['silk'] \ No newline at end of file + complete_apps = ['silk']