diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 9527774a..d4ef94d3 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -77,7 +77,7 @@ jobs: - name: Install black run: | python -m pip install --upgrade pip - python -m pip install black==22.6.0 + python -m pip install black==23.3.0 - name: Check linting run: black --check . \ No newline at end of file diff --git a/accounting/migrations/0001_initial.py b/accounting/migrations/0001_initial.py index 0196d3f2..51add331 100644 --- a/accounting/migrations/0001_initial.py +++ b/accounting/migrations/0001_initial.py @@ -8,7 +8,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [] operations = [ diff --git a/accounting/migrations/0002_auto_20160824_2152.py b/accounting/migrations/0002_auto_20160824_2152.py index d3b1c9a2..b0cc051f 100644 --- a/accounting/migrations/0002_auto_20160824_2152.py +++ b/accounting/migrations/0002_auto_20160824_2152.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("club", "0001_initial"), ("accounting", "0001_initial"), diff --git a/accounting/migrations/0003_auto_20160824_2203.py b/accounting/migrations/0003_auto_20160824_2203.py index 47ae232f..597f582f 100644 --- a/accounting/migrations/0003_auto_20160824_2203.py +++ b/accounting/migrations/0003_auto_20160824_2203.py @@ -6,7 +6,6 @@ import phonenumber_field.modelfields class Migration(migrations.Migration): - dependencies = [("accounting", "0002_auto_20160824_2152")] operations = [ diff --git a/accounting/migrations/0004_auto_20161005_1505.py b/accounting/migrations/0004_auto_20161005_1505.py index 8fe3a472..993754bd 100644 --- a/accounting/migrations/0004_auto_20161005_1505.py +++ b/accounting/migrations/0004_auto_20161005_1505.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("accounting", "0003_auto_20160824_2203")] operations = [ diff --git a/accounting/migrations/0005_auto_20170324_0917.py b/accounting/migrations/0005_auto_20170324_0917.py index c8258f8e..76bcbed6 100644 --- a/accounting/migrations/0005_auto_20170324_0917.py +++ b/accounting/migrations/0005_auto_20170324_0917.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("accounting", "0004_auto_20161005_1505")] operations = [ diff --git a/api/views/counter.py b/api/views/counter.py index ddc1edfe..604cd986 100644 --- a/api/views/counter.py +++ b/api/views/counter.py @@ -24,7 +24,6 @@ from api.views import RightModelViewSet class CounterSerializer(serializers.ModelSerializer): - is_open = serializers.BooleanField(read_only=True) barman_list = serializers.ListField( child=serializers.IntegerField(), read_only=True diff --git a/api/views/launderette.py b/api/views/launderette.py index a5d62e9f..ab7fcf66 100644 --- a/api/views/launderette.py +++ b/api/views/launderette.py @@ -24,7 +24,6 @@ from api.views import RightModelViewSet class LaunderettePlaceSerializer(serializers.ModelSerializer): - machine_list = serializers.ListField( child=serializers.IntegerField(), read_only=True ) diff --git a/club/forms.py b/club/forms.py index a5f63ffe..f23eb873 100644 --- a/club/forms.py +++ b/club/forms.py @@ -167,7 +167,6 @@ class SellingsForm(forms.Form): ) def __init__(self, club, *args, **kwargs): - super(SellingsForm, self).__init__(*args, **kwargs) self.fields["products"] = forms.ModelMultipleChoiceField( club.products.order_by("name").filter(archived=False).all(), diff --git a/club/migrations/0001_initial.py b/club/migrations/0001_initial.py index 17d3f309..55922e03 100644 --- a/club/migrations/0001_initial.py +++ b/club/migrations/0001_initial.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [] operations = [ diff --git a/club/migrations/0002_auto_20160824_2152.py b/club/migrations/0002_auto_20160824_2152.py index 444a96a6..6b69c1b7 100644 --- a/club/migrations/0002_auto_20160824_2152.py +++ b/club/migrations/0002_auto_20160824_2152.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("club", "0001_initial"), diff --git a/club/migrations/0003_auto_20160902_2042.py b/club/migrations/0003_auto_20160902_2042.py index 15eb34ad..7a3d05cd 100644 --- a/club/migrations/0003_auto_20160902_2042.py +++ b/club/migrations/0003_auto_20160902_2042.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("club", "0002_auto_20160824_2152")] operations = [ diff --git a/club/migrations/0004_auto_20160915_1057.py b/club/migrations/0004_auto_20160915_1057.py index 15fc00de..3f08d9dd 100644 --- a/club/migrations/0004_auto_20160915_1057.py +++ b/club/migrations/0004_auto_20160915_1057.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("club", "0003_auto_20160902_2042")] operations = [ diff --git a/club/migrations/0005_auto_20161120_1149.py b/club/migrations/0005_auto_20161120_1149.py index 93193f50..5fb949a7 100644 --- a/club/migrations/0005_auto_20161120_1149.py +++ b/club/migrations/0005_auto_20161120_1149.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("club", "0004_auto_20160915_1057")] operations = [ diff --git a/club/migrations/0006_auto_20161229_0040.py b/club/migrations/0006_auto_20161229_0040.py index 6bb03661..290ecf5b 100644 --- a/club/migrations/0006_auto_20161229_0040.py +++ b/club/migrations/0006_auto_20161229_0040.py @@ -6,7 +6,6 @@ import django.utils.timezone class Migration(migrations.Migration): - dependencies = [("club", "0005_auto_20161120_1149")] operations = [ diff --git a/club/migrations/0007_auto_20170324_0917.py b/club/migrations/0007_auto_20170324_0917.py index 9faa9e75..eb3c03cc 100644 --- a/club/migrations/0007_auto_20170324_0917.py +++ b/club/migrations/0007_auto_20170324_0917.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("club", "0006_auto_20161229_0040")] operations = [ diff --git a/club/migrations/0008_auto_20170515_2214.py b/club/migrations/0008_auto_20170515_2214.py index 6b65c629..52bb1074 100644 --- a/club/migrations/0008_auto_20170515_2214.py +++ b/club/migrations/0008_auto_20170515_2214.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("club", "0007_auto_20170324_0917")] operations = [ diff --git a/club/migrations/0009_auto_20170822_2232.py b/club/migrations/0009_auto_20170822_2232.py index 18fcd3c6..ce7dc337 100644 --- a/club/migrations/0009_auto_20170822_2232.py +++ b/club/migrations/0009_auto_20170822_2232.py @@ -9,7 +9,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("club", "0008_auto_20170515_2214"), diff --git a/club/migrations/0010_auto_20170912_2028.py b/club/migrations/0010_auto_20170912_2028.py index 84aaf09a..a9b32d1b 100644 --- a/club/migrations/0010_auto_20170912_2028.py +++ b/club/migrations/0010_auto_20170912_2028.py @@ -19,7 +19,6 @@ def generate_club_pages(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [("core", "0024_auto_20170906_1317"), ("club", "0010_club_logo")] operations = [ diff --git a/club/migrations/0010_club_logo.py b/club/migrations/0010_club_logo.py index 6dab697d..87cc4bba 100644 --- a/club/migrations/0010_club_logo.py +++ b/club/migrations/0010_club_logo.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("club", "0009_auto_20170822_2232")] operations = [ diff --git a/club/migrations/0011_auto_20180426_2013.py b/club/migrations/0011_auto_20180426_2013.py index 74ca6fd0..dc3234df 100644 --- a/club/migrations/0011_auto_20180426_2013.py +++ b/club/migrations/0011_auto_20180426_2013.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("club", "0010_auto_20170912_2028")] operations = [ diff --git a/club/models.py b/club/models.py index 5adc5a53..437dcdef 100644 --- a/club/models.py +++ b/club/models.py @@ -72,6 +72,7 @@ class Club(models.Model): _("short description"), max_length=1000, default="", blank=True, null=True ) address = models.CharField(_("address"), max_length=254) + # This function prevents generating migration upon settings change def get_default_owner_group(): return settings.SITH_GROUP_ROOT_ID diff --git a/club/views.py b/club/views.py index 5c3d61df..a597bf94 100644 --- a/club/views.py +++ b/club/views.py @@ -443,7 +443,6 @@ class ClubSellingCSVView(ClubSellingView): return row def get(self, request, *args, **kwargs): - self.object = self.get_object() kwargs = self.get_context_data(**kwargs) @@ -706,7 +705,6 @@ class ClubMailingView(ClubTabsMixin, CanEditMixin, DetailFormView): class MailingDeleteView(CanEditMixin, DeleteView): - model = Mailing template_name = "core/delete_confirm.jinja" pk_url_kwarg = "mailing_id" @@ -724,7 +722,6 @@ class MailingDeleteView(CanEditMixin, DeleteView): class MailingSubscriptionDeleteView(CanEditMixin, DeleteView): - model = MailingSubscription template_name = "core/delete_confirm.jinja" pk_url_kwarg = "mailing_subscription_id" diff --git a/com/migrations/0001_initial.py b/com/migrations/0001_initial.py index 8edde739..4fbab584 100644 --- a/com/migrations/0001_initial.py +++ b/com/migrations/0001_initial.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [] operations = [ diff --git a/com/migrations/0002_news_newsdate.py b/com/migrations/0002_news_newsdate.py index 026d949c..da548fdc 100644 --- a/com/migrations/0002_news_newsdate.py +++ b/com/migrations/0002_news_newsdate.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("club", "0005_auto_20161120_1149"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), diff --git a/com/migrations/0003_auto_20170115_2300.py b/com/migrations/0003_auto_20170115_2300.py index 6ca595e5..2087f40f 100644 --- a/com/migrations/0003_auto_20170115_2300.py +++ b/com/migrations/0003_auto_20170115_2300.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("club", "0006_auto_20161229_0040"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), diff --git a/com/migrations/0004_auto_20171221_1614.py b/com/migrations/0004_auto_20171221_1614.py index 853f810a..fe9539dc 100644 --- a/com/migrations/0004_auto_20171221_1614.py +++ b/com/migrations/0004_auto_20171221_1614.py @@ -8,7 +8,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("club", "0010_auto_20170912_2028"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), diff --git a/com/migrations/0005_auto_20180318_2227.py b/com/migrations/0005_auto_20180318_2227.py index 9c6a3711..9e041699 100644 --- a/com/migrations/0005_auto_20180318_2227.py +++ b/com/migrations/0005_auto_20180318_2227.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("com", "0004_auto_20171221_1614")] operations = [ diff --git a/com/migrations/0006_remove_sith_index_page.py b/com/migrations/0006_remove_sith_index_page.py index 124df8c6..13f264ad 100644 --- a/com/migrations/0006_remove_sith_index_page.py +++ b/com/migrations/0006_remove_sith_index_page.py @@ -6,7 +6,6 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [("com", "0005_auto_20180318_2227")] operations = [migrations.RemoveField(model_name="sith", name="index_page")] diff --git a/core/management/commands/compilemessages.py b/core/management/commands/compilemessages.py index 22a7e22c..b3c336bc 100644 --- a/core/management/commands/compilemessages.py +++ b/core/management/commands/compilemessages.py @@ -39,6 +39,5 @@ class Command(compilemessages.Command): """ def handle(self, *args, **options): - os.chdir("sith") super(Command, self).handle(*args, **options) diff --git a/core/management/commands/compilestatic.py b/core/management/commands/compilestatic.py index 51d99f6d..31e5c13e 100644 --- a/core/management/commands/compilestatic.py +++ b/core/management/commands/compilestatic.py @@ -60,7 +60,7 @@ class Command(BaseCommand): def compilescss(self, file): print("compiling %s" % file) - with (open(file.replace(".scss", ".css"), "w")) as newfile: + with open(file.replace(".scss", ".css"), "w") as newfile: newfile.write(self.compile(file)) def removescss(self, file): @@ -68,7 +68,6 @@ class Command(BaseCommand): os.remove(file) def handle(self, *args, **options): - if os.path.isdir(settings.STATIC_ROOT): print("---- Compiling scss files ---") self.exec_on_folder(settings.STATIC_ROOT, self.compilescss) diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py index 51b8bc2e..7474e93a 100644 --- a/core/migrations/0001_initial.py +++ b/core/migrations/0001_initial.py @@ -12,7 +12,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("auth", "0006_require_contenttypes_0002")] operations = [ diff --git a/core/migrations/0002_auto_20160831_0144.py b/core/migrations/0002_auto_20160831_0144.py index cc5fa3f1..8fbd762a 100644 --- a/core/migrations/0002_auto_20160831_0144.py +++ b/core/migrations/0002_auto_20160831_0144.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0001_initial")] operations = [ diff --git a/core/migrations/0003_auto_20160902_1914.py b/core/migrations/0003_auto_20160902_1914.py index fa6274c4..b39d9838 100644 --- a/core/migrations/0003_auto_20160902_1914.py +++ b/core/migrations/0003_auto_20160902_1914.py @@ -6,7 +6,6 @@ import django.core.validators class Migration(migrations.Migration): - dependencies = [("core", "0002_auto_20160831_0144")] operations = [ diff --git a/core/migrations/0004_user_godfathers.py b/core/migrations/0004_user_godfathers.py index e3e33d2c..d068cfc7 100644 --- a/core/migrations/0004_user_godfathers.py +++ b/core/migrations/0004_user_godfathers.py @@ -6,7 +6,6 @@ from django.conf import settings class Migration(migrations.Migration): - dependencies = [("core", "0003_auto_20160902_1914")] operations = [ diff --git a/core/migrations/0005_auto_20161105_1035.py b/core/migrations/0005_auto_20161105_1035.py index 5225f184..7d40b163 100644 --- a/core/migrations/0005_auto_20161105_1035.py +++ b/core/migrations/0005_auto_20161105_1035.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("core", "0004_user_godfathers")] operations = [ diff --git a/core/migrations/0006_auto_20161108_1703.py b/core/migrations/0006_auto_20161108_1703.py index 21b5a969..6fba0417 100644 --- a/core/migrations/0006_auto_20161108_1703.py +++ b/core/migrations/0006_auto_20161108_1703.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0005_auto_20161105_1035")] operations = [ diff --git a/core/migrations/0008_sithfile_asked_for_removal.py b/core/migrations/0008_sithfile_asked_for_removal.py index db3bc23d..300c799f 100644 --- a/core/migrations/0008_sithfile_asked_for_removal.py +++ b/core/migrations/0008_sithfile_asked_for_removal.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0006_auto_20161108_1703")] operations = [ diff --git a/core/migrations/0009_auto_20161120_1155.py b/core/migrations/0009_auto_20161120_1155.py index b2fccdf4..c017706a 100644 --- a/core/migrations/0009_auto_20161120_1155.py +++ b/core/migrations/0009_auto_20161120_1155.py @@ -7,7 +7,6 @@ import core.models class Migration(migrations.Migration): - dependencies = [("core", "0008_sithfile_asked_for_removal")] operations = [ diff --git a/core/migrations/0010_sithfile_is_in_sas.py b/core/migrations/0010_sithfile_is_in_sas.py index 38664c6f..d98116fd 100644 --- a/core/migrations/0010_sithfile_is_in_sas.py +++ b/core/migrations/0010_sithfile_is_in_sas.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0009_auto_20161120_1155")] operations = [ diff --git a/core/migrations/0011_auto_20161124_0848.py b/core/migrations/0011_auto_20161124_0848.py index a972bff6..b3ea7f4a 100644 --- a/core/migrations/0011_auto_20161124_0848.py +++ b/core/migrations/0011_auto_20161124_0848.py @@ -7,7 +7,6 @@ import core.models class Migration(migrations.Migration): - dependencies = [("core", "0010_sithfile_is_in_sas")] operations = [ diff --git a/core/migrations/0012_notification.py b/core/migrations/0012_notification.py index a7a68209..360fbcb8 100644 --- a/core/migrations/0012_notification.py +++ b/core/migrations/0012_notification.py @@ -8,7 +8,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("core", "0011_auto_20161124_0848")] operations = [ diff --git a/core/migrations/0013_auto_20161209_2338.py b/core/migrations/0013_auto_20161209_2338.py index e0475c5c..2bb96256 100644 --- a/core/migrations/0013_auto_20161209_2338.py +++ b/core/migrations/0013_auto_20161209_2338.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0012_notification")] operations = [ diff --git a/core/migrations/0014_auto_20161210_0009.py b/core/migrations/0014_auto_20161210_0009.py index 0c17aec7..8d4bbc6c 100644 --- a/core/migrations/0014_auto_20161210_0009.py +++ b/core/migrations/0014_auto_20161210_0009.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0013_auto_20161209_2338")] operations = [ diff --git a/core/migrations/0015_sithfile_moderator.py b/core/migrations/0015_sithfile_moderator.py index 13e6a3f2..20d1512f 100644 --- a/core/migrations/0015_sithfile_moderator.py +++ b/core/migrations/0015_sithfile_moderator.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("core", "0014_auto_20161210_0009")] operations = [ diff --git a/core/migrations/0016_auto_20161212_1922.py b/core/migrations/0016_auto_20161212_1922.py index f23b0dd5..bde89b82 100644 --- a/core/migrations/0016_auto_20161212_1922.py +++ b/core/migrations/0016_auto_20161212_1922.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("core", "0015_sithfile_moderator")] operations = [ diff --git a/core/migrations/0017_auto_20161220_1626.py b/core/migrations/0017_auto_20161220_1626.py index 51af77e5..bf076241 100644 --- a/core/migrations/0017_auto_20161220_1626.py +++ b/core/migrations/0017_auto_20161220_1626.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0016_auto_20161212_1922")] operations = [ diff --git a/core/migrations/0018_auto_20161224_0211.py b/core/migrations/0018_auto_20161224_0211.py index a3daf6f6..72f9a57d 100644 --- a/core/migrations/0018_auto_20161224_0211.py +++ b/core/migrations/0018_auto_20161224_0211.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0017_auto_20161220_1626")] operations = [ diff --git a/core/migrations/0019_preferences_receive_weekmail.py b/core/migrations/0019_preferences_receive_weekmail.py index 5bfe0d97..3f4dfff1 100644 --- a/core/migrations/0019_preferences_receive_weekmail.py +++ b/core/migrations/0019_preferences_receive_weekmail.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0018_auto_20161224_0211")] operations = [ diff --git a/core/migrations/0020_auto_20170324_0917.py b/core/migrations/0020_auto_20170324_0917.py index 09b390f3..c026483a 100644 --- a/core/migrations/0020_auto_20170324_0917.py +++ b/core/migrations/0020_auto_20170324_0917.py @@ -6,7 +6,6 @@ import django.core.validators class Migration(migrations.Migration): - dependencies = [("core", "0019_preferences_receive_weekmail")] operations = [ diff --git a/core/migrations/0021_auto_20170822_1529.py b/core/migrations/0021_auto_20170822_1529.py index 105d280c..1f5452b2 100644 --- a/core/migrations/0021_auto_20170822_1529.py +++ b/core/migrations/0021_auto_20170822_1529.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0020_auto_20170324_0917")] operations = [ diff --git a/core/migrations/0022_auto_20170822_2232.py b/core/migrations/0022_auto_20170822_2232.py index 787efb81..ff924258 100644 --- a/core/migrations/0022_auto_20170822_2232.py +++ b/core/migrations/0022_auto_20170822_2232.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0021_auto_20170822_1529")] operations = [ diff --git a/core/migrations/0023_auto_20170902_1226.py b/core/migrations/0023_auto_20170902_1226.py index 67798aa5..2cdc4c85 100644 --- a/core/migrations/0023_auto_20170902_1226.py +++ b/core/migrations/0023_auto_20170902_1226.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("core", "0022_auto_20170822_2232")] operations = [ diff --git a/core/migrations/0024_auto_20170906_1317.py b/core/migrations/0024_auto_20170906_1317.py index 1bd51690..7d47989f 100644 --- a/core/migrations/0024_auto_20170906_1317.py +++ b/core/migrations/0024_auto_20170906_1317.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0023_auto_20170902_1226")] operations = [ diff --git a/core/migrations/0025_auto_20170919_1521.py b/core/migrations/0025_auto_20170919_1521.py index 36370264..f37a829b 100644 --- a/core/migrations/0025_auto_20170919_1521.py +++ b/core/migrations/0025_auto_20170919_1521.py @@ -6,7 +6,6 @@ import django.core.validators class Migration(migrations.Migration): - dependencies = [("core", "0024_auto_20170906_1317")] operations = [ diff --git a/core/migrations/0026_auto_20170926_1512.py b/core/migrations/0026_auto_20170926_1512.py index 02ddbad5..a1538b64 100644 --- a/core/migrations/0026_auto_20170926_1512.py +++ b/core/migrations/0026_auto_20170926_1512.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0025_auto_20170919_1521")] operations = [ diff --git a/core/migrations/0027_gift.py b/core/migrations/0027_gift.py index ab342e26..21bf8442 100644 --- a/core/migrations/0027_gift.py +++ b/core/migrations/0027_gift.py @@ -8,7 +8,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("core", "0026_auto_20170926_1512")] operations = [ diff --git a/core/migrations/0028_auto_20171216_2044.py b/core/migrations/0028_auto_20171216_2044.py index f54df0e2..20bdad8a 100644 --- a/core/migrations/0028_auto_20171216_2044.py +++ b/core/migrations/0028_auto_20171216_2044.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0027_gift")] operations = [ diff --git a/core/migrations/0029_auto_20180426_2013.py b/core/migrations/0029_auto_20180426_2013.py index ac0a06be..eadfd558 100644 --- a/core/migrations/0029_auto_20180426_2013.py +++ b/core/migrations/0029_auto_20180426_2013.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("core", "0028_auto_20171216_2044")] operations = [ diff --git a/core/migrations/0030_auto_20190704_1500.py b/core/migrations/0030_auto_20190704_1500.py index 72121e9e..d15f9a25 100644 --- a/core/migrations/0030_auto_20190704_1500.py +++ b/core/migrations/0030_auto_20190704_1500.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0029_auto_20180426_2013")] operations = [ diff --git a/core/migrations/0031_auto_20190906_1615.py b/core/migrations/0031_auto_20190906_1615.py index 3c962332..d562ea8d 100644 --- a/core/migrations/0031_auto_20190906_1615.py +++ b/core/migrations/0031_auto_20190906_1615.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0030_auto_20190704_1500")] operations = [ diff --git a/core/migrations/0032_auto_20190909_0043.py b/core/migrations/0032_auto_20190909_0043.py index 35671cc0..d1af6070 100644 --- a/core/migrations/0032_auto_20190909_0043.py +++ b/core/migrations/0032_auto_20190909_0043.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0031_auto_20190906_1615")] operations = [ diff --git a/core/migrations/0033_auto_20191006_0049.py b/core/migrations/0033_auto_20191006_0049.py index 3f2628c8..00b0e61f 100644 --- a/core/migrations/0033_auto_20191006_0049.py +++ b/core/migrations/0033_auto_20191006_0049.py @@ -5,7 +5,6 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [("core", "0032_auto_20190909_0043")] operations = [ diff --git a/core/migrations/0034_operationlog.py b/core/migrations/0034_operationlog.py index 93083f99..df59cd6a 100644 --- a/core/migrations/0034_operationlog.py +++ b/core/migrations/0034_operationlog.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("core", "0033_auto_20191006_0049"), ] diff --git a/core/migrations/0035_auto_20200216_1743.py b/core/migrations/0035_auto_20200216_1743.py index 07545832..ed7ad429 100644 --- a/core/migrations/0035_auto_20200216_1743.py +++ b/core/migrations/0035_auto_20200216_1743.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("core", "0034_operationlog"), ] diff --git a/core/migrations/0036_auto_20211001_0248.py b/core/migrations/0036_auto_20211001_0248.py index 428bdb9e..a97e8b1b 100644 --- a/core/migrations/0036_auto_20211001_0248.py +++ b/core/migrations/0036_auto_20211001_0248.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0035_auto_20200216_1743")] operations = [ diff --git a/core/migrations/0037_auto_20211105_1708.py b/core/migrations/0037_auto_20211105_1708.py index 603d5435..e0a13a54 100644 --- a/core/migrations/0037_auto_20211105_1708.py +++ b/core/migrations/0037_auto_20211105_1708.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0036_auto_20211001_0248")] operations = [ diff --git a/core/models.py b/core/models.py index 276ec559..376aaa3b 100644 --- a/core/models.py +++ b/core/models.py @@ -1176,6 +1176,7 @@ class Page(models.Model): # Attention: this field may not be valid until you call save(). It's made for fast query, but don't rely on it when # playing with a Page object, use get_full_name() instead! _full_name = models.CharField(_("page name"), max_length=255, blank=True) + # This function prevents generating migration upon settings change def get_default_owner_group(): return settings.SITH_GROUP_ROOT_ID diff --git a/core/views/__init__.py b/core/views/__init__.py index 5d4d2ea5..fc807663 100644 --- a/core/views/__init__.py +++ b/core/views/__init__.py @@ -162,7 +162,6 @@ class GenericContentPermissionMixinBuilder(View): return cls.permission_function(obj, user) def dispatch(self, request, *arg, **kwargs): - if hasattr(self, "get_object") and callable(self.get_object): self.object = self.get_object() if not self.get_permission_function(self.object, request.user): diff --git a/core/views/user.py b/core/views/user.py index bcff5504..ffc6a623 100644 --- a/core/views/user.py +++ b/core/views/user.py @@ -413,6 +413,7 @@ class UserGodfathersTreePictureView(CanViewMixin, DetailView): self.graph = pgv.AGraph(strict=False, directed=True) family = set() self.level = 1 + # Since the tree isn't very deep, we can build it recursively def crawl_family(user): if self.level > self.depth: diff --git a/counter/migrations/0001_initial.py b/counter/migrations/0001_initial.py index de31a6e2..e9635e5d 100644 --- a/counter/migrations/0001_initial.py +++ b/counter/migrations/0001_initial.py @@ -9,7 +9,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("subscription", "0001_initial"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), diff --git a/counter/migrations/0002_auto_20160826_1342.py b/counter/migrations/0002_auto_20160826_1342.py index 9b97700e..ccc4288c 100644 --- a/counter/migrations/0002_auto_20160826_1342.py +++ b/counter/migrations/0002_auto_20160826_1342.py @@ -8,7 +8,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("counter", "0001_initial"), diff --git a/counter/migrations/0003_permanency_activity.py b/counter/migrations/0003_permanency_activity.py index 05707b20..be4e9962 100644 --- a/counter/migrations/0003_permanency_activity.py +++ b/counter/migrations/0003_permanency_activity.py @@ -7,7 +7,6 @@ from django.utils.timezone import utc class Migration(migrations.Migration): - dependencies = [("counter", "0002_auto_20160826_1342")] operations = [ diff --git a/counter/migrations/0004_auto_20160826_1907.py b/counter/migrations/0004_auto_20160826_1907.py index 6e2ddd21..ce4d6180 100644 --- a/counter/migrations/0004_auto_20160826_1907.py +++ b/counter/migrations/0004_auto_20160826_1907.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0003_permanency_activity")] operations = [ diff --git a/counter/migrations/0005_auto_20160826_2330.py b/counter/migrations/0005_auto_20160826_2330.py index 37f3510e..8e0df744 100644 --- a/counter/migrations/0005_auto_20160826_2330.py +++ b/counter/migrations/0005_auto_20160826_2330.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("counter", "0004_auto_20160826_1907")] operations = [ diff --git a/counter/migrations/0006_auto_20160831_1304.py b/counter/migrations/0006_auto_20160831_1304.py index 15b7b169..9ae1f4ec 100644 --- a/counter/migrations/0006_auto_20160831_1304.py +++ b/counter/migrations/0006_auto_20160831_1304.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0005_auto_20160826_2330")] operations = [ diff --git a/counter/migrations/0007_product_archived.py b/counter/migrations/0007_product_archived.py index 521eda48..5dd3140d 100644 --- a/counter/migrations/0007_product_archived.py +++ b/counter/migrations/0007_product_archived.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0006_auto_20160831_1304")] operations = [ diff --git a/counter/migrations/0008_counter_token.py b/counter/migrations/0008_counter_token.py index a02b5a5d..f8a5595e 100644 --- a/counter/migrations/0008_counter_token.py +++ b/counter/migrations/0008_counter_token.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0007_product_archived")] operations = [ diff --git a/counter/migrations/0009_eticket.py b/counter/migrations/0009_eticket.py index 23b9204c..68b675ef 100644 --- a/counter/migrations/0009_eticket.py +++ b/counter/migrations/0009_eticket.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("counter", "0008_counter_token")] operations = [ diff --git a/counter/migrations/0010_auto_20161003_1900.py b/counter/migrations/0010_auto_20161003_1900.py index e438b05e..91ed0756 100644 --- a/counter/migrations/0010_auto_20161003_1900.py +++ b/counter/migrations/0010_auto_20161003_1900.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0009_eticket")] operations = [ diff --git a/counter/migrations/0011_auto_20161004_2039.py b/counter/migrations/0011_auto_20161004_2039.py index c70bad63..439cd354 100644 --- a/counter/migrations/0011_auto_20161004_2039.py +++ b/counter/migrations/0011_auto_20161004_2039.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0010_auto_20161003_1900")] operations = [ diff --git a/counter/migrations/0012_auto_20170515_2202.py b/counter/migrations/0012_auto_20170515_2202.py index e50d4856..2c11c82f 100644 --- a/counter/migrations/0012_auto_20170515_2202.py +++ b/counter/migrations/0012_auto_20170515_2202.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0011_auto_20161004_2039")] operations = [ diff --git a/counter/migrations/0013_customer_recorded_products.py b/counter/migrations/0013_customer_recorded_products.py index 80f6d94d..d6b3cfa8 100644 --- a/counter/migrations/0013_customer_recorded_products.py +++ b/counter/migrations/0013_customer_recorded_products.py @@ -37,7 +37,6 @@ def balance_ecocups(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [("counter", "0012_auto_20170515_2202")] operations = [ diff --git a/counter/migrations/0014_auto_20170816_1521.py b/counter/migrations/0014_auto_20170816_1521.py index 7e13c170..14c64d8d 100644 --- a/counter/migrations/0014_auto_20170816_1521.py +++ b/counter/migrations/0014_auto_20170816_1521.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0013_customer_recorded_products")] operations = [ diff --git a/counter/migrations/0014_auto_20170817_1537.py b/counter/migrations/0014_auto_20170817_1537.py index 67acbc13..8fef9833 100644 --- a/counter/migrations/0014_auto_20170817_1537.py +++ b/counter/migrations/0014_auto_20170817_1537.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0013_customer_recorded_products")] operations = [ diff --git a/counter/migrations/0015_merge.py b/counter/migrations/0015_merge.py index aefcfaca..6dcff021 100644 --- a/counter/migrations/0015_merge.py +++ b/counter/migrations/0015_merge.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("counter", "0014_auto_20170817_1537"), ("counter", "0014_auto_20170816_1521"), diff --git a/counter/migrations/0016_producttype_comment.py b/counter/migrations/0016_producttype_comment.py index 295553b2..ad5ad487 100644 --- a/counter/migrations/0016_producttype_comment.py +++ b/counter/migrations/0016_producttype_comment.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("counter", "0015_merge")] operations = [ diff --git a/counter/migrations/0017_studentcard.py b/counter/migrations/0017_studentcard.py index 8304a104..a2f62222 100644 --- a/counter/migrations/0017_studentcard.py +++ b/counter/migrations/0017_studentcard.py @@ -8,7 +8,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("counter", "0016_producttype_comment")] operations = [ diff --git a/counter/migrations/0018_producttype_priority.py b/counter/migrations/0018_producttype_priority.py index 89149507..6bee9277 100644 --- a/counter/migrations/0018_producttype_priority.py +++ b/counter/migrations/0018_producttype_priority.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("counter", "0017_studentcard"), ] diff --git a/counter/migrations/0019_billinginfo.py b/counter/migrations/0019_billinginfo.py index 4a8af24b..c4c74c39 100644 --- a/counter/migrations/0019_billinginfo.py +++ b/counter/migrations/0019_billinginfo.py @@ -6,7 +6,6 @@ import django_countries.fields class Migration(migrations.Migration): - dependencies = [ ("counter", "0018_producttype_priority"), ] diff --git a/counter/migrations/0020_auto_20221215_1709.py b/counter/migrations/0020_auto_20221215_1709.py index ca5d1176..52010133 100644 --- a/counter/migrations/0020_auto_20221215_1709.py +++ b/counter/migrations/0020_auto_20221215_1709.py @@ -5,7 +5,6 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("counter", "0019_billinginfo"), ] diff --git a/eboutic/migrations/0001_initial.py b/eboutic/migrations/0001_initial.py index 8dd12da2..b642642f 100644 --- a/eboutic/migrations/0001_initial.py +++ b/eboutic/migrations/0001_initial.py @@ -8,7 +8,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)] operations = [ diff --git a/eboutic/migrations/0002_auto_20221005_2243.py b/eboutic/migrations/0002_auto_20221005_2243.py index 2c1138ae..2ed1c8d0 100644 --- a/eboutic/migrations/0002_auto_20221005_2243.py +++ b/eboutic/migrations/0002_auto_20221005_2243.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("eboutic", "0001_initial"), ] diff --git a/election/migrations/0001_initial.py b/election/migrations/0001_initial.py index 943928cc..d3c4c449 100644 --- a/election/migrations/0001_initial.py +++ b/election/migrations/0001_initial.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("core", "0018_auto_20161224_0211"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), diff --git a/election/migrations/0002_election_archived.py b/election/migrations/0002_election_archived.py index c113cf46..2b5ed86c 100644 --- a/election/migrations/0002_election_archived.py +++ b/election/migrations/0002_election_archived.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("election", "0001_initial")] operations = [ diff --git a/election/migrations/0003_auto_20171202_1819.py b/election/migrations/0003_auto_20171202_1819.py index e918bc06..6cb48dc6 100644 --- a/election/migrations/0003_auto_20171202_1819.py +++ b/election/migrations/0003_auto_20171202_1819.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("election", "0002_election_archived")] operations = [ diff --git a/election/migrations/0004_auto_20191006_0049.py b/election/migrations/0004_auto_20191006_0049.py index 01f5c1f9..7e553483 100644 --- a/election/migrations/0004_auto_20191006_0049.py +++ b/election/migrations/0004_auto_20191006_0049.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("election", "0003_auto_20171202_1819")] operations = [ diff --git a/forum/migrations/0001_initial.py b/forum/migrations/0001_initial.py index 866c25e8..6c06b0a6 100644 --- a/forum/migrations/0001_initial.py +++ b/forum/migrations/0001_initial.py @@ -10,7 +10,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("club", "0006_auto_20161229_0040"), diff --git a/forum/migrations/0002_auto_20170312_1753.py b/forum/migrations/0002_auto_20170312_1753.py index a0807c47..2634d59e 100644 --- a/forum/migrations/0002_auto_20170312_1753.py +++ b/forum/migrations/0002_auto_20170312_1753.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("forum", "0001_initial")] operations = [ diff --git a/forum/migrations/0003_auto_20170510_1754.py b/forum/migrations/0003_auto_20170510_1754.py index db175969..b708ae06 100644 --- a/forum/migrations/0003_auto_20170510_1754.py +++ b/forum/migrations/0003_auto_20170510_1754.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("forum", "0002_auto_20170312_1753")] operations = [ diff --git a/forum/migrations/0004_auto_20170531_1949.py b/forum/migrations/0004_auto_20170531_1949.py index d6c4a660..152bdaea 100644 --- a/forum/migrations/0004_auto_20170531_1949.py +++ b/forum/migrations/0004_auto_20170531_1949.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("forum", "0003_auto_20170510_1754")] operations = [ diff --git a/forum/migrations/0005_forumtopic_subscribed_users.py b/forum/migrations/0005_forumtopic_subscribed_users.py index 9e6e83c7..b1f6d629 100644 --- a/forum/migrations/0005_forumtopic_subscribed_users.py +++ b/forum/migrations/0005_forumtopic_subscribed_users.py @@ -6,7 +6,6 @@ from django.conf import settings class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("forum", "0004_auto_20170531_1949"), diff --git a/forum/migrations/0006_auto_20180426_2013.py b/forum/migrations/0006_auto_20180426_2013.py index 08ceed56..30248dec 100644 --- a/forum/migrations/0006_auto_20180426_2013.py +++ b/forum/migrations/0006_auto_20180426_2013.py @@ -6,7 +6,6 @@ import forum.models class Migration(migrations.Migration): - dependencies = [("forum", "0005_forumtopic_subscribed_users")] operations = [ diff --git a/forum/models.py b/forum/models.py index dd8722e9..9b92129d 100644 --- a/forum/models.py +++ b/forum/models.py @@ -157,6 +157,7 @@ class Forum(models.Model): self.save() _club_memberships = {} # This cache is particularly efficient: + # divided by 3 the number of requests on the main forum page # after the first load def is_owned_by(self, user): diff --git a/galaxy/migrations/0001_initial.py b/galaxy/migrations/0001_initial.py index e155d1cb..ab9a6a06 100644 --- a/galaxy/migrations/0001_initial.py +++ b/galaxy/migrations/0001_initial.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/launderette/migrations/0001_initial.py b/launderette/migrations/0001_initial.py index c6746b2c..79f011a7 100644 --- a/launderette/migrations/0001_initial.py +++ b/launderette/migrations/0001_initial.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("subscription", "0001_initial"), ("counter", "0001_initial")] operations = [ diff --git a/pedagogy/migrations/0001_initial.py b/pedagogy/migrations/0001_initial.py index b6ab939e..e4285277 100644 --- a/pedagogy/migrations/0001_initial.py +++ b/pedagogy/migrations/0001_initial.py @@ -9,7 +9,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - initial = True dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)] diff --git a/pedagogy/migrations/0002_auto_20190827_2251.py b/pedagogy/migrations/0002_auto_20190827_2251.py index 9f6c786c..5ab510df 100644 --- a/pedagogy/migrations/0002_auto_20190827_2251.py +++ b/pedagogy/migrations/0002_auto_20190827_2251.py @@ -45,7 +45,6 @@ def remove_multiples_comments_from_same_user(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [("pedagogy", "0001_initial")] operations = [ diff --git a/pedagogy/tests.py b/pedagogy/tests.py index d889f881..114daba2 100644 --- a/pedagogy/tests.py +++ b/pedagogy/tests.py @@ -758,7 +758,6 @@ class UVSearchTest(TestCase): ) def test_search_pa00_fail(self): - # Search with UV code response = self.client.get(reverse("pedagogy:guide"), {"search": "IFC"}) self.assertNotContains(response, text="PA00") diff --git a/poetry.lock b/poetry.lock index 662ba66f..9b96458e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -68,32 +68,46 @@ files = [ [[package]] name = "black" -version = "22.12.0" +version = "23.3.0" description = "The uncompromising code formatter." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"}, - {file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"}, - {file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"}, - {file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"}, - {file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"}, - {file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"}, - {file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"}, - {file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"}, - {file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"}, - {file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"}, - {file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"}, - {file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"}, + {file = "black-23.3.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:0945e13506be58bf7db93ee5853243eb368ace1c08a24c65ce108986eac65915"}, + {file = "black-23.3.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:67de8d0c209eb5b330cce2469503de11bca4085880d62f1628bd9972cc3366b9"}, + {file = "black-23.3.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:7c3eb7cea23904399866c55826b31c1f55bbcd3890ce22ff70466b907b6775c2"}, + {file = "black-23.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32daa9783106c28815d05b724238e30718f34155653d4d6e125dc7daec8e260c"}, + {file = "black-23.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:35d1381d7a22cc5b2be2f72c7dfdae4072a3336060635718cc7e1ede24221d6c"}, + {file = "black-23.3.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:a8a968125d0a6a404842fa1bf0b349a568634f856aa08ffaff40ae0dfa52e7c6"}, + {file = "black-23.3.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:c7ab5790333c448903c4b721b59c0d80b11fe5e9803d8703e84dcb8da56fec1b"}, + {file = "black-23.3.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:a6f6886c9869d4daae2d1715ce34a19bbc4b95006d20ed785ca00fa03cba312d"}, + {file = "black-23.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f3c333ea1dd6771b2d3777482429864f8e258899f6ff05826c3a4fcc5ce3f70"}, + {file = "black-23.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:11c410f71b876f961d1de77b9699ad19f939094c3a677323f43d7a29855fe326"}, + {file = "black-23.3.0-cp37-cp37m-macosx_10_16_x86_64.whl", hash = "sha256:1d06691f1eb8de91cd1b322f21e3bfc9efe0c7ca1f0e1eb1db44ea367dff656b"}, + {file = "black-23.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50cb33cac881766a5cd9913e10ff75b1e8eb71babf4c7104f2e9c52da1fb7de2"}, + {file = "black-23.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e114420bf26b90d4b9daa597351337762b63039752bdf72bf361364c1aa05925"}, + {file = "black-23.3.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:48f9d345675bb7fbc3dd85821b12487e1b9a75242028adad0333ce36ed2a6d27"}, + {file = "black-23.3.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:714290490c18fb0126baa0fca0a54ee795f7502b44177e1ce7624ba1c00f2331"}, + {file = "black-23.3.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:064101748afa12ad2291c2b91c960be28b817c0c7eaa35bec09cc63aa56493c5"}, + {file = "black-23.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:562bd3a70495facf56814293149e51aa1be9931567474993c7942ff7d3533961"}, + {file = "black-23.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:e198cf27888ad6f4ff331ca1c48ffc038848ea9f031a3b40ba36aced7e22f2c8"}, + {file = "black-23.3.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:3238f2aacf827d18d26db07524e44741233ae09a584273aa059066d644ca7b30"}, + {file = "black-23.3.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:f0bd2f4a58d6666500542b26354978218a9babcdc972722f4bf90779524515f3"}, + {file = "black-23.3.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:92c543f6854c28a3c7f39f4d9b7694f9a6eb9d3c5e2ece488c327b6e7ea9b266"}, + {file = "black-23.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a150542a204124ed00683f0db1f5cf1c2aaaa9cc3495b7a3b5976fb136090ab"}, + {file = "black-23.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:6b39abdfb402002b8a7d030ccc85cf5afff64ee90fa4c5aebc531e3ad0175ddb"}, + {file = "black-23.3.0-py3-none-any.whl", hash = "sha256:ec751418022185b0c1bb7d7736e6933d40bbb14c14a0abcf9123d1b159f98dd4"}, + {file = "black-23.3.0.tar.gz", hash = "sha256:1c7b8d606e728a41ea1ccbd7264677e494e87cf630e399262ced92d4a8dac940"}, ] [package.dependencies] click = ">=8.0.0" mypy-extensions = ">=0.4.3" +packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] @@ -798,7 +812,7 @@ name = "packaging" version = "23.0" description = "Core utilities for Python packages" category = "main" -optional = true +optional = false python-versions = ">=3.7" files = [ {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"}, @@ -1625,4 +1639,4 @@ testing = ["coverage"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "b279f94e0558ef98aa19af957d4dc75357e92c0ba133b79013af6c53dfa653e2" +content-hash = "253a2602174ac1f24e593b89f919db90f3027588e2b4e305482a27c5f237f5d0" diff --git a/pyproject.toml b/pyproject.toml index 3ba10d27..98c6272a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ docs = ["Sphinx", "sphinx-rtd-theme", "sphinx-copybutton"] [tool.poetry.dev-dependencies] django-debug-toolbar = "^4.0.0" ipython = "^7.28.0" -black = "^22.6.0" +black = "^23.3.0" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/rootplace/management/commands/delete_all_forum_user_messages.py b/rootplace/management/commands/delete_all_forum_user_messages.py index 8292d919..5bf9cd4b 100644 --- a/rootplace/management/commands/delete_all_forum_user_messages.py +++ b/rootplace/management/commands/delete_all_forum_user_messages.py @@ -40,7 +40,6 @@ class Command(BaseCommand): parser.add_argument("user_id", type=int) def handle(self, *args, **options): - user = User.objects.filter(id=options["user_id"]).first() if user is None: diff --git a/sas/migrations/0001_initial.py b/sas/migrations/0001_initial.py index a089648b..41ed4dc9 100644 --- a/sas/migrations/0001_initial.py +++ b/sas/migrations/0001_initial.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("core", "0006_auto_20161108_1703")] operations = [ diff --git a/sas/migrations/0002_auto_20161119_1241.py b/sas/migrations/0002_auto_20161119_1241.py index f1b684d7..21f44323 100644 --- a/sas/migrations/0002_auto_20161119_1241.py +++ b/sas/migrations/0002_auto_20161119_1241.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("sas", "0001_initial"), diff --git a/stock/migrations/0001_initial.py b/stock/migrations/0001_initial.py index 6faa40c4..43b658ff 100644 --- a/stock/migrations/0001_initial.py +++ b/stock/migrations/0001_initial.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("counter", "0011_auto_20161004_2039")] operations = [ diff --git a/subscription/migrations/0001_initial.py b/subscription/migrations/0001_initial.py index 39c37994..3ca942f0 100644 --- a/subscription/migrations/0001_initial.py +++ b/subscription/migrations/0001_initial.py @@ -7,7 +7,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("core", "0001_initial")] operations = [ diff --git a/subscription/migrations/0002_auto_20160830_1719.py b/subscription/migrations/0002_auto_20160830_1719.py index a649671d..db4aae52 100644 --- a/subscription/migrations/0002_auto_20160830_1719.py +++ b/subscription/migrations/0002_auto_20160830_1719.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0001_initial")] operations = [ diff --git a/subscription/migrations/0003_auto_20160902_1914.py b/subscription/migrations/0003_auto_20160902_1914.py index d1e23fd3..1cca6149 100644 --- a/subscription/migrations/0003_auto_20160902_1914.py +++ b/subscription/migrations/0003_auto_20160902_1914.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0002_auto_20160830_1719")] operations = [ diff --git a/subscription/migrations/0004_auto_20170821_1849.py b/subscription/migrations/0004_auto_20170821_1849.py index dc2ccdae..d3a02cc9 100644 --- a/subscription/migrations/0004_auto_20170821_1849.py +++ b/subscription/migrations/0004_auto_20170821_1849.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0003_auto_20160902_1914")] operations = [ diff --git a/subscription/migrations/0005_auto_20170821_2054.py b/subscription/migrations/0005_auto_20170821_2054.py index 291e806c..2e2ee983 100644 --- a/subscription/migrations/0005_auto_20170821_2054.py +++ b/subscription/migrations/0005_auto_20170821_2054.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0004_auto_20170821_1849")] operations = [ diff --git a/subscription/migrations/0006_auto_20170902_1222.py b/subscription/migrations/0006_auto_20170902_1222.py index e08d9dd3..492d47c3 100644 --- a/subscription/migrations/0006_auto_20170902_1222.py +++ b/subscription/migrations/0006_auto_20170902_1222.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0005_auto_20170821_2054")] operations = [ diff --git a/subscription/migrations/0007_auto_20180706_1135.py b/subscription/migrations/0007_auto_20180706_1135.py index 7eab1a84..88bbf386 100644 --- a/subscription/migrations/0007_auto_20180706_1135.py +++ b/subscription/migrations/0007_auto_20180706_1135.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0006_auto_20170902_1222")] operations = [ diff --git a/subscription/migrations/0008_auto_20180831_2016.py b/subscription/migrations/0008_auto_20180831_2016.py index 8582c835..35a8f033 100644 --- a/subscription/migrations/0008_auto_20180831_2016.py +++ b/subscription/migrations/0008_auto_20180831_2016.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0007_auto_20180706_1135")] operations = [ diff --git a/subscription/migrations/0009_auto_20180920_1421.py b/subscription/migrations/0009_auto_20180920_1421.py index a4330cd2..4af79468 100644 --- a/subscription/migrations/0009_auto_20180920_1421.py +++ b/subscription/migrations/0009_auto_20180920_1421.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0008_auto_20180831_2016")] operations = [ diff --git a/subscription/migrations/0010_auto_20180920_1441.py b/subscription/migrations/0010_auto_20180920_1441.py index af14dcd4..6d2058c4 100644 --- a/subscription/migrations/0010_auto_20180920_1441.py +++ b/subscription/migrations/0010_auto_20180920_1441.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0009_auto_20180920_1421")] operations = [ diff --git a/subscription/migrations/0011_auto_20190825_2215.py b/subscription/migrations/0011_auto_20190825_2215.py index 4768eece..75fcaa05 100644 --- a/subscription/migrations/0011_auto_20190825_2215.py +++ b/subscription/migrations/0011_auto_20190825_2215.py @@ -6,7 +6,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("subscription", "0010_auto_20180920_1441")] operations = [ diff --git a/subscription/migrations/0012_auto_20200615_1438.py b/subscription/migrations/0012_auto_20200615_1438.py index b318b00f..af33e546 100644 --- a/subscription/migrations/0012_auto_20200615_1438.py +++ b/subscription/migrations/0012_auto_20200615_1438.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("subscription", "0011_auto_20190825_2215"), ] diff --git a/subscription/migrations/0013_auto_20200828_2117.py b/subscription/migrations/0013_auto_20200828_2117.py index 7f5b4091..d723fa56 100644 --- a/subscription/migrations/0013_auto_20200828_2117.py +++ b/subscription/migrations/0013_auto_20200828_2117.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("subscription", "0012_auto_20200615_1438"), ] diff --git a/subscription/migrations/0014_auto_20201207_2323.py b/subscription/migrations/0014_auto_20201207_2323.py index 71cf3f02..5a81858c 100644 --- a/subscription/migrations/0014_auto_20201207_2323.py +++ b/subscription/migrations/0014_auto_20201207_2323.py @@ -4,7 +4,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("subscription", "0013_auto_20200828_2117"), ] diff --git a/subscription/tests.py b/subscription/tests.py index c3efa9c3..fe0c812d 100644 --- a/subscription/tests.py +++ b/subscription/tests.py @@ -107,7 +107,6 @@ class SubscriptionIntegrationTest(TestCase): self.user = User.objects.filter(username="public").first() def test_duration_one_month(self): - s = Subscription( member=User.objects.filter(pk=self.user.pk).first(), subscription_type=list(settings.SITH_SUBSCRIPTIONS.keys())[3], @@ -119,7 +118,6 @@ class SubscriptionIntegrationTest(TestCase): self.assertTrue(s.subscription_end == date(2017, 9, 29)) def test_duration_two_months(self): - s = Subscription( member=User.objects.filter(pk=self.user.pk).first(), subscription_type=list(settings.SITH_SUBSCRIPTIONS.keys())[3], @@ -131,7 +129,6 @@ class SubscriptionIntegrationTest(TestCase): self.assertTrue(s.subscription_end == date(2017, 10, 29)) def test_duration_one_day(self): - s = Subscription( member=User.objects.filter(pk=self.user.pk).first(), subscription_type=list(settings.SITH_SUBSCRIPTIONS.keys())[3], @@ -146,7 +143,6 @@ class SubscriptionIntegrationTest(TestCase): self.assertTrue(s.subscription_end == date(2017, 8, 30)) def test_duration_three_months(self): - s = Subscription( member=User.objects.filter(pk=self.user.pk).first(), subscription_type=list(settings.SITH_SUBSCRIPTIONS.keys())[3], @@ -158,7 +154,6 @@ class SubscriptionIntegrationTest(TestCase): self.assertTrue(s.subscription_end == date(2017, 11, 29)) def test_duration_four_months(self): - s = Subscription( member=User.objects.filter(pk=self.user.pk).first(), subscription_type=list(settings.SITH_SUBSCRIPTIONS.keys())[3], @@ -170,7 +165,6 @@ class SubscriptionIntegrationTest(TestCase): self.assertTrue(s.subscription_end == date(2017, 12, 30)) def test_duration_six_weeks(self): - s = Subscription( member=User.objects.filter(pk=self.user.pk).first(), subscription_type=list(settings.SITH_SUBSCRIPTIONS.keys())[3], diff --git a/trombi/migrations/0001_initial.py b/trombi/migrations/0001_initial.py index bb33b748..0943bad1 100644 --- a/trombi/migrations/0001_initial.py +++ b/trombi/migrations/0001_initial.py @@ -8,7 +8,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("club", "0007_auto_20170324_0917"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), diff --git a/trombi/migrations/0002_trombi_show_profiles.py b/trombi/migrations/0002_trombi_show_profiles.py index a3977b94..cb6bdbf5 100644 --- a/trombi/migrations/0002_trombi_show_profiles.py +++ b/trombi/migrations/0002_trombi_show_profiles.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("trombi", "0001_initial")] operations = [ diff --git a/trombi/migrations/0003_trombicomment_is_moderated.py b/trombi/migrations/0003_trombicomment_is_moderated.py index 2c44bc61..47ec61e6 100644 --- a/trombi/migrations/0003_trombicomment_is_moderated.py +++ b/trombi/migrations/0003_trombicomment_is_moderated.py @@ -5,7 +5,6 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [("trombi", "0002_trombi_show_profiles")] operations = [ diff --git a/trombi/migrations/0004_trombiclubmembership.py b/trombi/migrations/0004_trombiclubmembership.py index 55813312..5bb017b4 100644 --- a/trombi/migrations/0004_trombiclubmembership.py +++ b/trombi/migrations/0004_trombiclubmembership.py @@ -6,7 +6,6 @@ import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [("trombi", "0003_trombicomment_is_moderated")] operations = [ diff --git a/trombi/views.py b/trombi/views.py index e646fdd6..590d98fc 100644 --- a/trombi/views.py +++ b/trombi/views.py @@ -100,7 +100,6 @@ class UserIsInATrombiMixin(View): """ def dispatch(self, request, *args, **kwargs): - if not hasattr(self.request.user, "trombi_user"): raise Http404()