Skip to content

Commit

Permalink
Merge pull request #1160 from uktrade/develop
Browse files Browse the repository at this point in the history
Release PR
  • Loading branch information
davidu1975 authored Jan 26, 2024
2 parents 1fa0fae + e98c5a2 commit 739bb30
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 51 deletions.
2 changes: 1 addition & 1 deletion core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def get_tree_based_url(self, include_site_url=False):
def get_url_path_parts(self):
return [self.view_path, self.slug + '/']

def get_url(self, is_draft=False, language_code=settings.LANGUAGE_CODE):
def get_url(self, request=None, current_site=None, is_draft=False, language_code=settings.LANGUAGE_CODE):
url = self.full_url
querystring = {}
if is_draft:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ <h2>
</h2>

<ul class="actions">
{% page_listing_buttons page page_perms %}
{% page_listing_buttons page request.user next_url=actions_next_url %}
</ul>

2 changes: 1 addition & 1 deletion core/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


@hooks.register('register_page_listing_more_buttons')
def add_copy_button(page, page_perms, next_url=None, is_parent=False):
def add_copy_button(page, user=None, next_url=None):
if isinstance(page, models.BasePage):
yield Button(
'Copy upstream',
Expand Down
74 changes: 37 additions & 37 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
django==4.2.7
djangorestframework==3.14.*
django-environ==0.*
gunicorn==20.*
sentry-sdk==1.*
django_storages==1.13.*
whitenoise==6.4.*
dj-database-url==2.*
psycopg2==2.9.* --no-binary psycopg2
django-pglocks==1.0.*
boto3==1.24.*
sigauth==5.2.4
directory-healthcheck==3.2
directory-components==40.*
directory-constants==24.*
django-celery-beat==2.5.0
django-environ==0.11.2
django-filter==23.5
django-modeltranslation==0.18.11
django-pglocks==1.0.4
django-redis==5.4.0
django-storages==1.13.2
djangorestframework==3.14.0
wagtail-markdown==0.11.1
wagtail-modeltranslation==0.14.*
wagtail==5.2.2
wagtailmedia==0.14.*
directory-components==40.1.1
directory-constants==24.1.0
directory-healthcheck==3.3
django-staff-sso-client==4.2.1
html2text==2020.*
pytube==9.2.2
django-filter>=2.4.0
django-redis
notifications-python-client==9.0.0
sigauth==5.2.4
bleach-whitelist==0.*
bleach==3.*
boto3==1.24.*
celery[redis]
django-celery-beat==2.5.0
certifi==2023.7.22
cryptography==41.*
dj-database-url==2.*
drf-spectacular
elastic-apm>6.0
gevent==23.9.*
gunicorn==20.*
html2text==2020.*
kombu==5.3.1
requests[security]>=2.31.0
markdown==3.*
bleach==3.*
bleach-whitelist==0.*
wagtail==5.2.2
wagtail-markdown==0.11
wagtail-modeltranslation==0.14.*
django-modeltranslation==0.18.*
urllib3==1.26.*
w3lib==1.22
notifications-python-client==6.3.*
num2words==0.5.10
pycountry==19.8.18
elastic-apm>6.0
gevent==23.9.*
psycogreen==1.0.2
wagtailmedia==0.14.*
cryptography==41.*
oauthlib==3.2.*
drf-spectacular
certifi==2023.7.22
psycogreen==1.0.2
psycopg2==2.9.* --no-binary psycopg2
pycountry==19.8.18
pytube==9.2.2
requests[security]>=2.31.0
sentry-sdk==1.*
urllib3==1.26.*
w3lib==1.22
whitenoise==6.4.*
willow==1.6.*
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ directory-constants==24.1.0
# via
# -r requirements.in
# directory-components
directory-healthcheck==3.2
directory-healthcheck==3.3
# via -r requirements.in
dj-database-url==2.1.0
# via -r requirements.in
Expand Down Expand Up @@ -191,7 +191,7 @@ markdown==3.5.2
# wagtail-markdown
mohawk==1.1.0
# via sigauth
notifications-python-client==6.3.0
notifications-python-client==9.0.0
# via -r requirements.in
num2words==0.5.10
# via -r requirements.in
Expand Down Expand Up @@ -307,7 +307,7 @@ wagtail==5.2.2
# wagtail-markdown
# wagtail-modeltranslation
# wagtailmedia
wagtail-markdown==0.11.0
wagtail-markdown==0.11.1
# via -r requirements.in
wagtail-modeltranslation==0.14.1
# via -r requirements.in
Expand Down
14 changes: 7 additions & 7 deletions requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ directory-constants==24.1.0
# via
# -r requirements.in
# directory-components
directory-healthcheck==3.2
directory-healthcheck==3.3
# via -r requirements.in
dj-database-url==2.1.0
# via -r requirements.in
django==4.2.8
django==4.2.7
# via
# -r requirements.in
# directory-components
Expand Down Expand Up @@ -174,7 +174,7 @@ factory-boy==3.3.0
# via
# -r requirements_test.in
# wagtail-factories
faker==22.5.0
faker==22.5.1
# via factory-boy
filetype==1.2.0
# via willow
Expand Down Expand Up @@ -228,7 +228,7 @@ mccabe==0.7.0
# via flake8
mohawk==1.1.0
# via sigauth
notifications-python-client==6.3.0
notifications-python-client==9.0.0
# via -r requirements.in
num2words==0.5.10
# via -r requirements.in
Expand All @@ -252,7 +252,7 @@ pillow-heif==0.14.0
# via willow
pip-tools==7.3.0
# via -r requirements_test.in
pluggy==1.3.0
pluggy==1.4.0
# via pytest
prompt-toolkit==3.0.43
# via click-repl
Expand Down Expand Up @@ -331,7 +331,7 @@ s3transfer==0.6.2
# via boto3
sentry-sdk==1.39.2
# via -r requirements.in
sigauth==5.2.3
sigauth==5.2.4
# via -r requirements.in
six==1.16.0
# via
Expand Down Expand Up @@ -400,7 +400,7 @@ wagtail==5.2.2
# wagtailmedia
wagtail-factories==4.1.0
# via -r requirements_test.in
wagtail-markdown==0.11.0
wagtail-markdown==0.11.1
# via -r requirements.in
wagtail-modeltranslation==0.14.1
# via -r requirements.in
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@pytest.mark.django_db
def test_add_copy_button(page_with_reversion):
page = page_with_reversion
buttons = list(wagtail_hooks.add_copy_button(page=page, page_perms=None))
buttons = list(wagtail_hooks.add_copy_button(page=page))

assert len(buttons) == 2
assert buttons[0].label == 'Copy upstream'
Expand Down

0 comments on commit 739bb30

Please sign in to comment.