mirror of
https://github.com/bugsink/bugsink.git
synced 2026-01-06 05:10:15 -06:00
Issues list pagination
This commit is contained in:
2
theme/static/css/dist/styles.css
vendored
2
theme/static/css/dist/styles.css
vendored
File diff suppressed because one or more lines are too long
17
theme/templatetags/add_to_qs.py
Normal file
17
theme/templatetags/add_to_qs.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from copy import copy
|
||||
from django import template
|
||||
from django.utils.http import urlencode
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag(takes_context=True)
|
||||
def add_to_qs(context, **kwargs):
|
||||
if 'request' not in context:
|
||||
# "should not happen", because this tag is only assumed to be used in RequestContext templates, but it's not
|
||||
# something I want to break for. Also: we have an answer that "mostly works" for that case, so let's do that.
|
||||
return urlencode(kwargs)
|
||||
|
||||
query = copy(context['request'].GET.dict())
|
||||
query.update(kwargs)
|
||||
return urlencode(query)
|
||||
Reference in New Issue
Block a user