mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-05 15:27:53 +10:00
remove django-url-tools in favor of core_tags snippet
This commit is contained in:
@@ -99,7 +99,6 @@ 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)
|
||||
@@ -204,7 +203,6 @@ TEMPLATES = [
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'url_tools.context_processors.current_url',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -38,3 +38,9 @@ def result_list_tag(parser, token):
|
||||
template_name='snapshots_grid.html',
|
||||
takes_context=False,
|
||||
)
|
||||
|
||||
@register.simple_tag(takes_context=True)
|
||||
def url_replace(context, **kwargs):
|
||||
dict_ = context['request'].GET.copy()
|
||||
dict_.update(**kwargs)
|
||||
return dict_.urlencode()
|
||||
|
||||
Reference in New Issue
Block a user