From b1737e4e1d76d3c0978d533a79b73a09682323b8 Mon Sep 17 00:00:00 2001 From: Charlie Denton Date: Wed, 4 Jan 2023 00:19:35 +0000 Subject: [PATCH] Remove "blank=True" from fields We don't need it any more, because we don't have any forms. --- cbv/migrations/0010_auto_20230104_0019.py | 30 +++++++++++++++++++++++ cbv/models.py | 8 +++--- 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 cbv/migrations/0010_auto_20230104_0019.py diff --git a/cbv/migrations/0010_auto_20230104_0019.py b/cbv/migrations/0010_auto_20230104_0019.py new file mode 100644 index 00000000..f941b22c --- /dev/null +++ b/cbv/migrations/0010_auto_20230104_0019.py @@ -0,0 +1,30 @@ +# Generated by Django 3.1.14 on 2023-01-04 00:19 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [("cbv", "0009_move_unique_constraint")] + + operations = [ + migrations.AlterField( + model_name="klass", + name="docstring", + field=models.TextField(default=""), + ), + migrations.AlterField( + model_name="method", + name="docstring", + field=models.TextField(default=""), + ), + migrations.AlterField( + model_name="module", + name="docstring", + field=models.TextField(default=""), + ), + migrations.AlterField( + model_name="projectversion", + name="sortable_version_number", + field=models.CharField(max_length=200), + ), + ] diff --git a/cbv/models.py b/cbv/models.py index 1ea59f14..e63bfc43 100644 --- a/cbv/models.py +++ b/cbv/models.py @@ -17,7 +17,7 @@ class ProjectVersion(models.Model): """Represents a particular version of a project in a python project hierarchy""" version_number = models.CharField(max_length=200) - sortable_version_number = models.CharField(max_length=200, blank=True) + sortable_version_number = models.CharField(max_length=200) objects = ProjectVersionManager() @@ -69,7 +69,7 @@ class Module(models.Model): project_version = models.ForeignKey(ProjectVersion, models.CASCADE) name = models.CharField(max_length=200) - docstring = models.TextField(blank=True, default="") + docstring = models.TextField(default="") filename = models.CharField(max_length=511, default="") objects = ModuleManager() @@ -146,7 +146,7 @@ class Klass(models.Model): module = models.ForeignKey(Module, models.CASCADE) name = models.CharField(max_length=200) - docstring = models.TextField(blank=True, default="") + docstring = models.TextField(default="") line_number = models.IntegerField() import_path = models.CharField(max_length=255) # because docs urls differ between Django versions @@ -368,7 +368,7 @@ class Method(models.Model): klass = models.ForeignKey(Klass, models.CASCADE) name = models.CharField(max_length=200) - docstring = models.TextField(blank=True, default="") + docstring = models.TextField(default="") code = models.TextField() kwargs = models.CharField(max_length=200) line_number = models.IntegerField()