diff --git a/Makefile b/Makefile index 1738dc9d6..795d61e94 100644 --- a/Makefile +++ b/Makefile @@ -45,15 +45,11 @@ lint: $(VIRTUAL_ENV)/bin/isort --diff -c $(SOURCE_DIRS) || EXIT_STATUS=$$?; \ $(VIRTUAL_ENV)/bin/flake8 $(SOURCE_DIRS) --exclude migrations,settings || EXIT_STATUS=$$?; \ npm run lint || EXIT_STATUS=$$?; \ - $(VIRTUAL_ENV)/bin/python manage.py makemigrations --dry-run --check --noinput || EXIT_STATUS=$$?; \ - exit $${EXIT_STATUS} .PHONY: lint-quick lint-quick: EXIT_STATUS=0; \ npm run lint-staged || EXIT_STATUS=$$?; \ - $(VIRTUAL_ENV)/bin/python manage.py makemigrations --dry-run --check --noinput || EXIT_STATUS=$$?; \ - exit $${EXIT_STATUS} .PHONY: lint-python-files lint-python-files: diff --git a/adhocracy4/maps/migrations/0003_alter_areasettings_module.py b/adhocracy4/maps/migrations/0003_alter_areasettings_module.py index bef9c6116..c11a987d8 100644 --- a/adhocracy4/maps/migrations/0003_alter_areasettings_module.py +++ b/adhocracy4/maps/migrations/0003_alter_areasettings_module.py @@ -1,4 +1,4 @@ -# Generated by Django 4.0 on 2023-11-07 15:26 +# Generated by Django 4.2 on 2023-11-29 12:49 from django.db import migrations, models import django.db.models.deletion diff --git a/adhocracy4/modules/admin.py b/adhocracy4/modules/admin.py index df5af5e79..107d29cd8 100644 --- a/adhocracy4/modules/admin.py +++ b/adhocracy4/modules/admin.py @@ -24,6 +24,7 @@ class ItemAdmin(admin.ModelAdmin): class ModuleAdmin(admin.ModelAdmin): inlines = [phase_admin.PhaseInline] + search_fields = ["name"] list_filter = ("project__organisation", "project") list_display = ("__str__", "name") if hasattr(settings, "A4_BLUEPRINT_TYPES"): diff --git a/adhocracy4/modules/migrations/0008_alter_module_blueprint_type.py b/adhocracy4/modules/migrations/0008_alter_module_blueprint_type.py index ad2f49fe8..5806a7588 100644 --- a/adhocracy4/modules/migrations/0008_alter_module_blueprint_type.py +++ b/adhocracy4/modules/migrations/0008_alter_module_blueprint_type.py @@ -1,7 +1,6 @@ -# Generated by Django 4.0 on 2023-11-07 15:26 +# Generated by Django 4.2 on 2023-11-29 12:49 -import adhocracy4.modules.fields -from django.db import migrations +from django.db import migrations, models class Migration(migrations.Migration): @@ -13,8 +12,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name="module", name="blueprint_type", - field=adhocracy4.modules.fields.BlueprintTypeField( - blank=True, choices=[], max_length=255 - ), + field=models.CharField(blank=True, max_length=255), ), ] diff --git a/adhocracy4/modules/models.py b/adhocracy4/modules/models.py index cd93ce601..c5d559bb0 100644 --- a/adhocracy4/modules/models.py +++ b/adhocracy4/modules/models.py @@ -11,8 +11,6 @@ from adhocracy4.models import base from adhocracy4.projects import models as project_models -from .fields import BlueprintTypeField - class ModulesQuerySet(models.QuerySet): def annotate_module_start(self): @@ -95,7 +93,7 @@ class Module(models.Model): objects = ModulesQuerySet.as_manager() - blueprint_type = BlueprintTypeField( + blueprint_type = models.CharField( max_length=255, blank=True, ) diff --git a/adhocracy4/projects/migrations/0042_alter_project_topics.py b/adhocracy4/projects/migrations/0042_alter_project_topics.py deleted file mode 100644 index fc24e64b3..000000000 --- a/adhocracy4/projects/migrations/0042_alter_project_topics.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 4.0 on 2023-11-07 15:26 - -import adhocracy4.projects.fields -from django.db import migrations - - -class Migration(migrations.Migration): - dependencies = [ - ("a4projects", "0041_ckeditor5_iframes"), - ] - - operations = [ - migrations.AlterField( - model_name="project", - name="topics", - field=adhocracy4.projects.fields.TopicField( - choices=[ - ("ANT", "Anti-discrimination"), - ("WOR", "Work & economy"), - ("BUI", "Building & living"), - ], - default="", - help_text="Add topics to your project.", - max_length=254, - verbose_name="Project topics", - ), - ), - ] diff --git a/changelog/0005.md b/changelog/0005.md new file mode 100644 index 000000000..a6e5dd221 --- /dev/null +++ b/changelog/0005.md @@ -0,0 +1,3 @@ +### Changed + +- apps/modules: change blueprint_type to char field (was creating migrations in forked projects after django upgrade to 4.x)