Skip to content

Commit

Permalink
Merge branch 'feature/django_upgrade' of https://github.com/CenterFor…
Browse files Browse the repository at this point in the history
…OpenScience/osf.io into django-3-2

* 'feature/django_upgrade' of https://github.com/CenterForOpenScience/osf.io:
  [Django Upgrade] Upgrade markdown and mdx_del_ins (CenterForOpenScience#9984)
  [Django Upgrade] Replace M2M direct assignment  (CenterForOpenScience#10010)
  [Django Upgrade] Upgrade django-elasticsearch-metrics (CenterForOpenScience#10021)
  [Django Upgrade] Fix one sub-query slicing issue (CenterForOpenScience#10012)
  • Loading branch information
John Tordoff committed Aug 17, 2022
2 parents 8a32ddb + afa62a7 commit 70e5608
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
12 changes: 4 additions & 8 deletions addons/wiki/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,12 @@ def build_html_output(content, node):
content,
extensions=[
wikilinks.WikiLinkExtension(
configs=[
('base_url', ''),
('end_url', ''),
('build_url', functools.partial(build_wiki_url, node))
]
base_url='',
end_url='',
build_url=functools.partial(build_wiki_url, node)
),
fenced_code.FencedCodeExtension(),
codehilite.CodeHiliteExtension(
[('css_class', 'highlight')]
)
codehilite.CodeHiliteExtension(css_class='highlight')
]
)

Expand Down
2 changes: 1 addition & 1 deletion admin/meetings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def form_valid(self, form):
custom_fields, data = get_custom_fields(form.cleaned_data)
if 'admins' in form.changed_data:
admin_users = get_admin_users(data.get('admins'))
self.conf.admins = admin_users
self.conf.admins.set(admin_users)
self.conf.name = data.get('name')
self.conf.info_url = data.get('info_url')
self.conf.logo_url = data.get('logo_url')
Expand Down
2 changes: 1 addition & 1 deletion api_tests/preprints/views/test_preprint_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ def no_license(self):
@pytest.fixture()
def preprint_provider(self, cc0_license, no_license):
preprint_provider = PreprintProviderFactory()
preprint_provider.licenses_acceptable = [cc0_license, no_license]
preprint_provider.licenses_acceptable.add(*[cc0_license, no_license])
preprint_provider.save()
return preprint_provider

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Werkzeug==1.0.0
Flask==1.0
gevent==1.2.2
Mako==1.0.7
Markdown==2.6.9
Markdown==3.3.7
WTForms==1.0.4
# Fork of celery 4.1.1 with https://github.com/celery/celery/pull/4278 backported,
# which fixes a bug that was causing stuck registrations
Expand Down Expand Up @@ -40,7 +40,7 @@ pymongo==3.7.1
PyYAML==6.0
tqdm==4.28.1
# Python markdown extensions for comment emails
git+https://github.com/CenterForOpenScience/mdx_del_ins.git
git+https://github.com/Johnetordoff/mdx_del_ins.git@django-3

certifi==2020.12.5
sendgrid==1.5.13
Expand Down
2 changes: 1 addition & 1 deletion website/project/views/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def update_comment_node(root_target_id, source_node, destination_node):


def render_email_markdown(content):
return markdown.markdown(content, ['del_ins', 'markdown.extensions.tables', 'markdown.extensions.fenced_code'])
return markdown.markdown(content, extensions=['mdx_del_ins', 'markdown.extensions.tables', 'markdown.extensions.fenced_code'])


@comment_added.connect
Expand Down

0 comments on commit 70e5608

Please sign in to comment.