mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-30 22:45:20 -04:00
remove django-url-tools in favor of core_tags snippet
This commit is contained in:
parent
3f1a19dd35
commit
89a066da0b
3 changed files with 21 additions and 16 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue