diff --git a/adhocracy4/maps/migrations/0003_alter_areasettings_module.py b/adhocracy4/maps/migrations/0003_alter_areasettings_module.py new file mode 100644 index 000000000..bef9c6116 --- /dev/null +++ b/adhocracy4/maps/migrations/0003_alter_areasettings_module.py @@ -0,0 +1,23 @@ +# Generated by Django 4.0 on 2023-11-07 15:26 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + dependencies = [ + ("a4modules", "0008_alter_module_blueprint_type"), + ("a4maps", "0002_change_help_text"), + ] + + operations = [ + migrations.AlterField( + model_name="areasettings", + name="module", + field=models.OneToOneField( + on_delete=django.db.models.deletion.CASCADE, + related_name="%(class)s_settings", + to="a4modules.module", + ), + ), + ] diff --git a/adhocracy4/modules/migrations/0008_alter_module_blueprint_type.py b/adhocracy4/modules/migrations/0008_alter_module_blueprint_type.py new file mode 100644 index 000000000..ad2f49fe8 --- /dev/null +++ b/adhocracy4/modules/migrations/0008_alter_module_blueprint_type.py @@ -0,0 +1,20 @@ +# Generated by Django 4.0 on 2023-11-07 15:26 + +import adhocracy4.modules.fields +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("a4modules", "0007_verbose_name_created_modified"), + ] + + operations = [ + migrations.AlterField( + model_name="module", + name="blueprint_type", + field=adhocracy4.modules.fields.BlueprintTypeField( + blank=True, choices=[], max_length=255 + ), + ), + ] diff --git a/adhocracy4/projects/migrations/0040_alter_project_topics.py b/adhocracy4/projects/migrations/0040_alter_project_topics.py new file mode 100644 index 000000000..cc9a86fa2 --- /dev/null +++ b/adhocracy4/projects/migrations/0040_alter_project_topics.py @@ -0,0 +1,28 @@ +# 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", "0039_add_alt_text_to_field"), + ] + + 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/7776.md b/changelog/7776.md new file mode 100644 index 000000000..d1023b3c9 --- /dev/null +++ b/changelog/7776.md @@ -0,0 +1,4 @@ +### Upgraded + +- Django from 3.2.20 to 4.0 + - added migrations for max_length diff --git a/requirements/base.txt b/requirements/base.txt index ed4c84536..632f9c548 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ bleach[css]==6.0.0 -Django==3.2.20 +Django==4.0 django-allauth==0.54.0 git+https://github.com/liqd/django-autoslug.git@liqd2212#egg=django-autoslug django-ckeditor==6.6.1 diff --git a/tests/apps/ideas/migrations/0006_alter_idea_labels.py b/tests/apps/ideas/migrations/0006_alter_idea_labels.py new file mode 100644 index 000000000..f5c0c4505 --- /dev/null +++ b/tests/apps/ideas/migrations/0006_alter_idea_labels.py @@ -0,0 +1,20 @@ +# Generated by Django 4.0 on 2023-11-07 15:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("a4labels", "0003_labelalias"), + ("a4test_ideas", "0005_idea_is_bool_test"), + ] + + operations = [ + migrations.AlterField( + model_name="idea", + name="labels", + field=models.ManyToManyField( + related_name="%(app_label)s_%(class)s_label", to="a4labels.Label" + ), + ), + ] diff --git a/tests/project/urls.py b/tests/project/urls.py index f91cde19a..189862938 100644 --- a/tests/project/urls.py +++ b/tests/project/urls.py @@ -1,5 +1,5 @@ from django.contrib import admin -from django.contrib.auth import views +from django.contrib.auth.views import LoginView from django.urls import include from django.urls import path from rest_framework import routers @@ -31,6 +31,6 @@ path("admin/", admin.site.urls), path("projects/", include(prj_urls)), path("modules/", include(mod_urls)), - path("accounts/login", views.LoginView, name="account_login"), + path("accounts/login", LoginView.as_view(), name="account_login"), path("dashboard/", include(dashboard_urls)), ]