Skip to content

Commit

Permalink
Upgraded Django to 5.0.7 and Wagtail to 6.1.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbusenius committed Jul 19, 2024
1 parent a94a63a commit e1fbad4
Show file tree
Hide file tree
Showing 63 changed files with 404 additions and 253 deletions.
2 changes: 0 additions & 2 deletions ask_a_librarian/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ class AskPage(PublicBasePage, ContactFields):
],
null=True,
blank=True,
use_json_field=True,
)
ask_widget_name = models.CharField(max_length=100, blank=True)
body = StreamField(
DefaultBodyFields(
null=True,
blank=True,
),
use_json_field=True,
)
reference_resources = RichTextField(
blank=True,
Expand Down
2 changes: 1 addition & 1 deletion base/fixtures/test.json

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions base/migrations/0017_alter_localmedia_caption_language.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Generated by Django 5.0.7 on 2024-07-19 20:43

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("base", "0016_alter_intranetindexpage_editor_and_more"),
]

operations = [
migrations.AlterField(
model_name="localmedia",
name="caption_language",
field=models.CharField(
choices=[
("af", "Afrikaans"),
("sq", "Albanian"),
("ar", "Arabic"),
("hy", "Armenian"),
("az", "Azerbaijani"),
("eu", "Basque"),
("be", "Belarusian"),
("bn", "Bengali"),
("bs", "Bosnian"),
("br", "Breton"),
("bg", "Bulgarian"),
("my", "Burmese"),
("ca", "Catalan"),
("hr", "Croatian"),
("cs", "Czech"),
("da", "Danish"),
("nl", "Dutch"),
("en", "English"),
("eo", "Esperanto"),
("et", "Estonian"),
("fi", "Finnish"),
("fr", "French"),
("fy", "Frisian"),
("gl", "Galician"),
("ka", "Georgian"),
("de", "German"),
("el", "Greek"),
("he", "Hebrew"),
("hi", "Hindi"),
("hu", "Hungarian"),
("is", "Icelandic"),
("io", "Ido"),
("ig", "Igbo"),
("id", "Indonesian"),
("ia", "Interlingua"),
("ga", "Irish"),
("it", "Italian"),
("ja", "Japanese"),
("kn", "Kannada"),
("kk", "Kazakh"),
("km", "Khmer"),
("ko", "Korean"),
("ky", "Kyrgyz"),
("lv", "Latvian"),
("lt", "Lithuanian"),
("lb", "Luxembourgish"),
("mk", "Macedonian"),
("ms", "Malay"),
("ml", "Malayalam"),
("mr", "Marathi"),
("mn", "Mongolian"),
("ne", "Nepali"),
("nb", "Norwegian Bokmål"),
("nn", "Norwegian Nynorsk"),
("os", "Ossetic"),
("fa", "Persian"),
("pl", "Polish"),
("pt", "Portuguese"),
("pa", "Punjabi"),
("ro", "Romanian"),
("ru", "Russian"),
("gd", "Scottish Gaelic"),
("sr", "Serbian"),
("sk", "Slovak"),
("sl", "Slovenian"),
("es", "Spanish"),
("sw", "Swahili"),
("sv", "Swedish"),
("tg", "Tajik"),
("ta", "Tamil"),
("tt", "Tatar"),
("te", "Telugu"),
("th", "Thai"),
("tr", "Turkish"),
("tk", "Turkmen"),
("uk", "Ukrainian"),
("ur", "Urdu"),
("ug", "Uyghur"),
("uz", "Uzbek"),
("vi", "Vietnamese"),
("cy", "Welsh"),
],
default="en",
max_length=2,
),
),
]
8 changes: 2 additions & 6 deletions base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,8 +1387,8 @@ class BasePageWithoutStaffPageForeignKeys(
Page.search_fields
+ AbstractBaseWithoutStaffPageForeignKeys.search_fields
+ [
index.SearchField('search_description', partial_match=True),
index.SearchField('title', partial_match=True, boost=4),
index.AutocompleteField('search_description'),
index.AutocompleteField('title', boost=4),
]
)

Expand Down Expand Up @@ -1570,7 +1570,6 @@ class PublicBasePage(BasePage):
[
('spreadsheet', LinkQueueSpreadsheetBlock()),
],
use_json_field=True,
default='',
blank=True,
help_text='Spreadsheets should be .xlsx files with the following headers: "Start Date", "End Date", "Link Text", and "URL"',
Expand Down Expand Up @@ -2264,7 +2263,6 @@ def friendly_name(self):
class IntranetPlainPage(BasePage):
body = StreamField(
IntranetDefaultBodyFields(),
use_json_field=True,
)

subpage_types = [
Expand Down Expand Up @@ -2323,12 +2321,10 @@ def get_context(self, request):
class IntranetIndexPage(BasePage):
intro = StreamField(
DefaultBodyFields(),
use_json_field=True,
)
display_hierarchical_listing = models.BooleanField(default=False)
body = StreamField(
DefaultBodyFields(),
use_json_field=True,
)

subpage_types = [
Expand Down
6 changes: 3 additions & 3 deletions base/templates/base/page_owners_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ <h2>Page Owners Report</h2>
<section id="account" class="active nice-padding">
<ul class="fields">
{% block fields %}
{% include "wagtailadmin/shared/field_as_li.html" with field=form.site %}
{% include "wagtailadmin/shared/field_as_li.html" with field=form.cnetid %}
{% include "wagtailadmin/shared/field_as_li.html" with field=form.role %}
<li>{% include "wagtailadmin/shared/field.html" with field=form.site %}</li>
<li>{% include "wagtailadmin/shared/field.html" with field=form.cnetid %}</li>
<li>{% include "wagtailadmin/shared/field.html" with field=form.role %}</li>
{% endblock fields %}
<li><input type="submit" value="{% trans 'Download Report' %}" class="button" /></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion base/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from public.models import LocationPage, StandardPage
from staff.models import StaffIndexPage, StaffPage
from units.models import UnitPage
from wagtail.core.blocks.stream_block import StreamValue
from wagtail.blocks.stream_block import StreamValue
from wagtail.documents.models import Document
from wagtail.models import Page, Site
from wagtailcache.cache import clear_cache
Expand Down
4 changes: 2 additions & 2 deletions base/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def has_permission(user, required_groups):
return user_groups.issuperset(required_groups)


@hooks.register('insert_editor_css')
@hooks.register('insert_global_admin_css')
def editor_css():
"""
Modify the admin css in order to hide
Expand Down Expand Up @@ -140,6 +140,6 @@ def register_frank_menu_item():
return MenuItem(
'Page Owners Report',
reverse('page_owners_report'),
classnames='icon icon-download',
classname='icon icon-download',
order=10009
)
2 changes: 0 additions & 2 deletions conferences/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ class ConferencePage(PublicBasePage, SocialMediaFields):
secondary_registration_description = models.TextField(blank=True)
body = StreamField(
DefaultBodyFields(),
use_json_field=True,
)

# Panels and subpage types
Expand Down Expand Up @@ -280,7 +279,6 @@ class ConferenceSubPage(PublicBasePage):
"""
body = StreamField(
DefaultBodyFields(),
use_json_field=True,
)

content_panels = Page.content_panels + [
Expand Down
1 change: 0 additions & 1 deletion dirbrowse/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class DirBrowsePage(PublicBasePage):
DefaultBodyFields(),
blank=True,
null=True,
use_json_field=True,
)
dir_browse_script_url = CharField(
max_length=255,
Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0011_grouppage_meeting_end_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from __future__ import unicode_literals

from django.db import migrations, models
from django.utils.timezone import utc
import datetime

utc = datetime.timezone.utc


class Migration(migrations.Migration):

Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0012_auto_20151119_2253.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from django.db import migrations, models
import datetime
from django.utils.timezone import utc

utc = datetime.timezone.utc


class Migration(migrations.Migration):
Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0013_auto_20151120_1921.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

from django.db import migrations, models
import base.models
from django.utils.timezone import utc
import wagtail.blocks
import datetime
import wagtail.images.blocks
import wagtail.fields

utc = datetime.timezone.utc


class Migration(migrations.Migration):

Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0014_auto_20151120_1930.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from __future__ import unicode_literals

from django.db import migrations, models
from django.utils.timezone import utc
import datetime

utc = datetime.timezone.utc


class Migration(migrations.Migration):

Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0015_auto_20151120_1931.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import wagtail.fields
import datetime
import wagtail.images.blocks
from django.utils.timezone import utc

utc = datetime.timezone.utc


class Migration(migrations.Migration):
Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0016_auto_20151120_1957.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from django.db import migrations, models
import datetime
from django.utils.timezone import utc

utc = datetime.timezone.utc


class Migration(migrations.Migration):
Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0017_auto_20151120_1958.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from __future__ import unicode_literals

from django.db import migrations, models
from django.utils.timezone import utc
import datetime

utc = datetime.timezone.utc


class Migration(migrations.Migration):

Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0018_auto_20151120_2127.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from django.db import migrations, models
import datetime
from django.utils.timezone import utc

utc = datetime.timezone.utc


class Migration(migrations.Migration):
Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0019_auto_20151120_2136.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from __future__ import unicode_literals

from django.db import migrations, models
from django.utils.timezone import utc
import datetime

utc = datetime.timezone.utc


class Migration(migrations.Migration):

Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0020_auto_20151120_2139.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from django.db import migrations, models
import datetime
from django.utils.timezone import utc

utc = datetime.timezone.utc


class Migration(migrations.Migration):
Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0021_auto_20151120_2139.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from django.db import migrations, models
import datetime
from django.utils.timezone import utc

utc = datetime.timezone.utc


class Migration(migrations.Migration):
Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0022_auto_20151120_2143.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from django.db import migrations, models
import datetime
from django.utils.timezone import utc

utc = datetime.timezone.utc


class Migration(migrations.Migration):
Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0023_auto_20151123_1749.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
from django.db import migrations, models
import wagtail.images.blocks
import datetime
from django.utils.timezone import utc
import base.models
import wagtail.fields
import wagtail.blocks

utc = datetime.timezone.utc


class Migration(migrations.Migration):

Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0024_auto_20151123_1752.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
import wagtail.fields
import wagtail.blocks
import datetime
from django.utils.timezone import utc
import wagtail.images.blocks

utc = datetime.timezone.utc


class Migration(migrations.Migration):

Expand Down
3 changes: 2 additions & 1 deletion group/migrations/0025_auto_20151123_1821.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from __future__ import unicode_literals

from django.db import migrations, models
from django.utils.timezone import utc
import datetime

utc = datetime.timezone.utc


class Migration(migrations.Migration):

Expand Down
Loading

0 comments on commit e1fbad4

Please sign in to comment.