diff --git a/apps/api/urls.py b/apps/api/urls.py index 4f27185..ee8c34e 100644 --- a/apps/api/urls.py +++ b/apps/api/urls.py @@ -2,7 +2,8 @@ # SPDX-License-Identifier: GPL-3.0-or-later from django.conf import settings -from django.conf.urls import url, include +from django.conf.urls import include +from django.urls import re_path as url from rest_framework import routers from .views import UserInformationView diff --git a/apps/note/migrations/0003_alter_note_polymorphic_ctype_and_more.py b/apps/note/migrations/0003_alter_note_polymorphic_ctype_and_more.py new file mode 100644 index 0000000..0873339 --- /dev/null +++ b/apps/note/migrations/0003_alter_note_polymorphic_ctype_and_more.py @@ -0,0 +1,36 @@ +# Generated by Django 4.2.7 on 2023-11-07 13:06 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + dependencies = [ + ("contenttypes", "0002_remove_content_type_name"), + ("note", "0002_special_note"), + ] + + operations = [ + migrations.AlterField( + model_name="note", + name="polymorphic_ctype", + field=models.ForeignKey( + editable=False, + null=True, + on_delete=django.db.models.deletion.CASCADE, + related_name="polymorphic_%(app_label)s.%(class)s_set+", + to="contenttypes.contenttype", + ), + ), + migrations.AlterField( + model_name="transaction", + name="polymorphic_ctype", + field=models.ForeignKey( + editable=False, + null=True, + on_delete=django.db.models.deletion.CASCADE, + related_name="polymorphic_%(app_label)s.%(class)s_set+", + to="contenttypes.contenttype", + ), + ), + ] diff --git a/apps/note/templates/note/amount_input.html b/apps/note/templates/note/amount_input.html index d487311..3da9ac4 100644 --- a/apps/note/templates/note/amount_input.html +++ b/apps/note/templates/note/amount_input.html @@ -9,7 +9,12 @@ SPDX-License-Identifier: GPL-3.0-or-later name="{{ widget.name }}" {# Other attributes are loaded #} {% for name, value in widget.attrs.items %} - {% ifnotequal value False %}{{ name }}{% ifnotequal value True %}="{{ value|stringformat:'s' }}"{% endifnotequal %}{% endifnotequal %} + {% if value != False %} + {{ name }} + {% if value != True %} + ="{{ value|stringformat:'s' }}" + {% endif %} + {% endif %} {% endfor %}>