mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-06-02 15:49:51 -04:00
add django-url-tools to fix pagination and search on public index
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
Build Debian package / build (push) Waiting to run
Build Docker image / buildx (push) Waiting to run
Build Homebrew package / build (push) Waiting to run
Build GitHub Pages website / deploy (push) Blocked by required conditions
Build GitHub Pages website / build (push) Waiting to run
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
Build Debian package / build (push) Waiting to run
Build Docker image / buildx (push) Waiting to run
Build Homebrew package / build (push) Waiting to run
Build GitHub Pages website / deploy (push) Blocked by required conditions
Build GitHub Pages website / build (push) Waiting to run
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
This commit is contained in:
parent
1492c02bfa
commit
0619750ffa
4 changed files with 19 additions and 18 deletions
|
@ -99,6 +99,7 @@ INSTALLED_APPS = [
|
|||
'django_jsonform', # handles rendering Pydantic models to Django HTML widgets/forms https://github.com/bhch/django-jsonform
|
||||
'signal_webhooks', # handles REST API outbound webhooks https://github.com/MrThearMan/django-signal-webhooks
|
||||
'django_object_actions', # provides easy Django Admin action buttons on change views https://github.com/crccheck/django-object-actions
|
||||
'url_tools', # adds template tags to append/toggle URL parameters https://bitbucket.org/monwara/django-url-tools
|
||||
|
||||
# Our ArchiveBox-provided apps
|
||||
#'config', # ArchiveBox config settings (loaded as a plugin, don't need to add it here)
|
||||
|
@ -203,6 +204,7 @@ TEMPLATES = [
|
|||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'url_tools.context_processors.current_url',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
<br/>
|
||||
<span class="step-links">
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="{% url 'public-index' %}?page=1">« first</a>
|
||||
<a href="{% url 'public-index' %}?page={{ page_obj.previous_page_number }}">previous</a>
|
||||
<a href="{% add_params request.get_full_path page='1' %}">« first</a>
|
||||
<a href="{% add_params request.get_full_path page=page_obj.previous_page_number %}">previous</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
@ -65,8 +65,8 @@
|
|||
|
||||
{% if page_obj.has_next %}
|
||||
|
||||
<a href="{% url 'public-index' %}?page={{ page_obj.next_page_number }}">next </a>
|
||||
<a href="{% url 'public-index' %}?page={{ page_obj.paginator.num_pages }}">last »</a>
|
||||
<a href="{% add_params request.get_full_path page=page_obj.next_page_number %}">next </a>
|
||||
<a href="{% add_params request.get_full_path page=page_obj.paginator.num_pages %}">last »</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
<br>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue