-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ideas,moderatorfeedback,organisations: replace richtext with ckeditor
- Loading branch information
Showing
11 changed files
with
163 additions
and
34 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
apps/budgeting/migrations/0003_alter_proposal_description.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.19 on 2024-03-26 10:34 | ||
|
||
from django.db import migrations | ||
import django_ckeditor_5.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("a4_candy_budgeting", "0002_rename_moderatorfeedback_fields"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="proposal", | ||
name="description", | ||
field=django_ckeditor_5.fields.CKEditor5Field(verbose_name="Description"), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.19 on 2024-03-26 10:34 | ||
|
||
from django.db import migrations | ||
import django_ckeditor_5.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("a4_candy_ideas", "0002_rename_moderatorfeedback_fields"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="idea", | ||
name="description", | ||
field=django_ckeditor_5.fields.CKEditor5Field(verbose_name="Description"), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
apps/mapideas/migrations/0003_alter_mapidea_description.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.19 on 2024-03-26 10:34 | ||
|
||
from django.db import migrations | ||
import django_ckeditor_5.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("a4_candy_mapideas", "0002_moderatorfeedback_fields"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="mapidea", | ||
name="description", | ||
field=django_ckeditor_5.fields.CKEditor5Field(verbose_name="Description"), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
apps/moderatorfeedback/migrations/0006_auto_20240326_1134.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.19 on 2024-03-26 10:34 | ||
|
||
from django.db import migrations | ||
import django_ckeditor_5.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("a4_candy_moderatorfeedback", "0005_moderatorcommentfeedback"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="moderatorcommentfeedback", | ||
name="feedback_text", | ||
field=django_ckeditor_5.fields.CKEditor5Field( | ||
blank=True, verbose_name="Moderator feedback" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="moderatorfeedback", | ||
name="feedback_text", | ||
field=django_ckeditor_5.fields.CKEditor5Field( | ||
blank=True, verbose_name="Official feedback" | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Generated by Django 3.2.19 on 2024-03-26 10:34 | ||
|
||
from django.db import migrations | ||
import django_ckeditor_5.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("a4_candy_organisations", "0023_alter_organisationtranslation_information"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="organisation", | ||
name="data_protection", | ||
field=django_ckeditor_5.fields.CKEditor5Field( | ||
blank=True, | ||
help_text="Please provide all the legally required information of your data protection. The data protection policy will be shown on a separate page.", | ||
verbose_name="Data protection policy", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="organisation", | ||
name="imprint", | ||
field=django_ckeditor_5.fields.CKEditor5Field( | ||
blank=True, | ||
help_text="Please provide all the legally required information of your imprint. The imprint will be shown on a separate page.", | ||
verbose_name="Imprint", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="organisation", | ||
name="netiquette", | ||
field=django_ckeditor_5.fields.CKEditor5Field( | ||
blank=True, | ||
help_text="Please provide a netiquette for the participants. The netiquette helps improving the climate of online discussions and supports the moderation.", | ||
verbose_name="Netiquette", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="organisation", | ||
name="terms_of_use", | ||
field=django_ckeditor_5.fields.CKEditor5Field( | ||
blank=True, | ||
help_text="Please provide all the legally required information of your terms of use. The terms of use will be shown on a separate page.", | ||
verbose_name="Terms of use", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,9 +268,9 @@ def test_send_organisation_missing_alt_text(admin, client, project): | |
"sender": "[email protected]", | ||
"subject": "Testsubject", | ||
"body": "Testbody <img>", | ||
"receivers": newsletter_models.ORGANISATION, | ||
"receivers": newsletter_models.PROJECT, | ||
"organisation": organisation.pk, | ||
"project": "", | ||
"project": project.pk, | ||
"send": "Send", | ||
} | ||
|
||
|
@@ -293,30 +293,31 @@ def test_send_organisation_with_alt_text( | |
organisation = project.organisation | ||
user1 = user_factory(get_newsletters=True) | ||
user2 = user_factory(get_newsletters=True) | ||
user_factory() | ||
|
||
email_address_factory(user=user1, email=user1.email, primary=True, verified=True) | ||
email_address_factory(user=user2, email=user2.email, primary=True, verified=True) | ||
|
||
follow_models.Follow.objects.all().delete() | ||
follow_factory(creator=user1, project=project) | ||
follow_factory(creator=user2, project=project, enabled=False) | ||
assert newsletter_models.Newsletter.objects.count() == 0 | ||
|
||
data = { | ||
"sender_name": "Tester", | ||
"sender": "[email protected]", | ||
"subject": "Testsubject", | ||
"body": 'Testbody <img alt="description">', | ||
"receivers": newsletter_models.ORGANISATION, | ||
"receivers": newsletter_models.PROJECT, | ||
"organisation": organisation.pk, | ||
"project": "", | ||
"project": project.pk, | ||
"send": "Send", | ||
} | ||
|
||
url = reverse( | ||
"a4dashboard:newsletter-create", kwargs={"organisation_slug": organisation.slug} | ||
) | ||
client.login(username=admin.email, password="password") | ||
response = client.post(url, data) | ||
assert redirect_target(response) == "newsletter-create" | ||
client.post(url, data) | ||
assert newsletter_models.Newsletter.objects.count() == 1 | ||
assert len(mail.outbox) == 1 | ||
assert mail.outbox[0].to == [user1.email] | ||
|