mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-06-06 09:31:19 -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
|
'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
|
'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
|
'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
|
# Our ArchiveBox-provided apps
|
||||||
#'config', # ArchiveBox config settings (loaded as a plugin, don't need to add it here)
|
#'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.template.context_processors.request',
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
'django.contrib.messages.context_processors.messages',
|
'django.contrib.messages.context_processors.messages',
|
||||||
|
'url_tools.context_processors.current_url',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -54,8 +54,8 @@
|
||||||
<br/>
|
<br/>
|
||||||
<span class="step-links">
|
<span class="step-links">
|
||||||
{% if page_obj.has_previous %}
|
{% if page_obj.has_previous %}
|
||||||
<a href="{% url 'public-index' %}?page=1">« first</a>
|
<a href="{% add_params request.get_full_path 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=page_obj.previous_page_number %}">previous</a>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@
|
||||||
|
|
||||||
{% if page_obj.has_next %}
|
{% if page_obj.has_next %}
|
||||||
|
|
||||||
<a href="{% url 'public-index' %}?page={{ page_obj.next_page_number }}">next </a>
|
<a href="{% add_params request.get_full_path 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.paginator.num_pages %}">last »</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
|
|
26
pdm.lock
generated
26
pdm.lock
generated
|
@ -5,7 +5,7 @@
|
||||||
groups = ["default", "all", "ldap", "sonic"]
|
groups = ["default", "all", "ldap", "sonic"]
|
||||||
strategy = ["inherit_metadata"]
|
strategy = ["inherit_metadata"]
|
||||||
lock_version = "4.5.0"
|
lock_version = "4.5.0"
|
||||||
content_hash = "sha256:d35702a8094586329c85290f6709dfe303ba7bbd62d78048989b67086c8a63dd"
|
content_hash = "sha256:a03237d9196e1d9b2f82130d026c5fa9eaf165a7d2079393baa2205bedd92674"
|
||||||
|
|
||||||
[[metadata.targets]]
|
[[metadata.targets]]
|
||||||
requires_python = "==3.11.*"
|
requires_python = "==3.11.*"
|
||||||
|
@ -642,6 +642,17 @@ files = [
|
||||||
{file = "django_taggit-1.3.0-py3-none-any.whl", hash = "sha256:609b0223d8a652f3fae088b7fd29f294fdadaca2d7931d45c27d6c59b02fdf31"},
|
{file = "django_taggit-1.3.0-py3-none-any.whl", hash = "sha256:609b0223d8a652f3fae088b7fd29f294fdadaca2d7931d45c27d6c59b02fdf31"},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "django-url-tools"
|
||||||
|
version = "0.0.8"
|
||||||
|
summary = "Django helpers for dealing with URLs in templates"
|
||||||
|
groups = ["default"]
|
||||||
|
marker = "python_version == \"3.11\""
|
||||||
|
files = [
|
||||||
|
{file = "django-url-tools-0.0.8.tar.gz", hash = "sha256:012cf28796265cd805b502f360c9a86f750b02dd7d5c770fc878bf1dead5aada"},
|
||||||
|
{file = "django-url-tools-0.0.8.zip", hash = "sha256:9d9cb034d3e1768ef4b98ab3e3ebb75eae51530d04c11ad19ecbefa30831d762"},
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "et-xmlfile"
|
name = "et-xmlfile"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
|
@ -993,19 +1004,6 @@ dependencies = [
|
||||||
"requests",
|
"requests",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pocket"
|
|
||||||
version = "0.3.7"
|
|
||||||
git = "https://github.com/tapanpandita/pocket.git"
|
|
||||||
ref = "v0.3.7"
|
|
||||||
revision = "5a144438cc89bfc0ec94db960718ccf1f76468c1"
|
|
||||||
summary = "api wrapper for getpocket.com"
|
|
||||||
groups = ["default"]
|
|
||||||
marker = "python_version == \"3.11\""
|
|
||||||
dependencies = [
|
|
||||||
"requests",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prompt-toolkit"
|
name = "prompt-toolkit"
|
||||||
version = "3.0.48"
|
version = "3.0.48"
|
||||||
|
|
|
@ -88,6 +88,7 @@ dependencies = [
|
||||||
"base32-crockford==0.3.0",
|
"base32-crockford==0.3.0",
|
||||||
############# Extractor Dependencies #############
|
############# Extractor Dependencies #############
|
||||||
"yt-dlp>=2024.8.6", # for: media
|
"yt-dlp>=2024.8.6", # for: media
|
||||||
|
"django-url-tools>=0.0.8",
|
||||||
]
|
]
|
||||||
|
|
||||||
# pdm lock --group=':all'
|
# pdm lock --group=':all'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue