Skip to content

Commit

Permalink
Merge pull request #122 from ckan/fix-deprecated-url-helper
Browse files Browse the repository at this point in the history
Replace deprecated h.url() helper.
  • Loading branch information
pdelboca authored Feb 13, 2023
2 parents b9f7e49 + f6e932a commit e65d81c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.6'
python-version: '3.10'
- name: Install requirements
run: pip install flake8 pycodestyle
- name: Check syntax
Expand Down
2 changes: 1 addition & 1 deletion ckanext/pages/textbox/templates/textbox_form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="control-group">
<label for="field-content-ck" class="control-label">{{ _('Content') }}</label>
</div>
<textarea id="field-content-ck" name="content" placeholder="{{_('My content')}}" data-module="textbox" style="height:400px" data-module-site_url="{{ h.dump_json(h.url('/', locale='default', qualified=true)) }}"> {{ data.content }}</textarea>
<textarea id="field-content-ck" name="content" placeholder="{{_('My content')}}" data-module="textbox" style="height:400px" data-module-site_url="{{ h.dump_json(h.url_for('/', locale='default', qualified=true)) }}"> {{ data.content }}</textarea>

{% resource 'textbox/main' %}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h1>{{ _('Edit page') }}</h1>
<div class="control-group">
<label for="field-content-ck" class="control-label">{{ _('Content') }}</label>
</div>
<textarea id="field-content-ck" name="content" placeholder="{{_('My content')}}" data-module="ckedit" style="height:400px" data-module-site_url="{{ h.dump_json(h.url('/', locale='default', qualified=true)) }}"> {{ data.content }}</textarea>
<textarea id="field-content-ck" name="content" placeholder="{{_('My content')}}" data-module="ckedit" style="height:400px" data-module-site_url="{{ h.dump_json(h.url_for('/', locale='default', qualified=true)) }}"> {{ data.content }}</textarea>
{% else %}
{{ form.markdown('content', id='field-content', label=_('Content'), placeholder=_('Enter content here'), value=data.content, error=errors.content) }}
{% endif %}
Expand Down

0 comments on commit e65d81c

Please sign in to comment.