# Path: dju_common/http.py
# def full_url(path=None, secure=None, request=None):
#     if secure is None:
#         secure = dju_settings.USE_HTTPS
#     site = Site.objects.get_current(request)
#     return '{}://{}{}'.format((secure and 'https' or 'http'), site.domain, path or '')
# 
# Path: dju_common/tools.py
# def long_number_readable(value):
#     """
#     Convert big int (>=999) to readable form.
#     1000 => 1k.
#     2333 => 2.3k.
#     1000000 => 1 mln.
#     1258000 => 1.26 mln.
#     """
#     value = int(value)
#     if value < 1000:
#         return value
#     for m, d, inf, fnf, n in _long_number_readable_formats:
#         if value < m:
#             return ((inf if value % d == 0 else fnf) + unicode(n)).format(value / float(d))
#     return value


import simplejson
from django import template
from django.template.loader import get_template
from django.http import QueryDict
from django.utils.safestring import mark_safe, mark_for_escaping
from django.utils.encoding import force_unicode
from dju_common.http import full_url
from dju_common.tools import long_number_readable
    if not type_:
        gv = request_get.urlencode()
    if gv:
        gv = l + gv + r
    return gv


@register.simple_tag(takes_context=True)
def url_getvars(context, token=None):
    return mark_for_escaping(_url_getvars(context, token))


@register.simple_tag(takes_context=True)
def url_getvars_with(context, token):
    return mark_for_escaping(_url_getvars(context, token, 'with'))


@register.simple_tag(takes_context=True)
def url_getvars_without(context, token):
    return mark_for_escaping(_url_getvars(context, token, 'without'))


@register.simple_tag(takes_context=True)
def full_url_prefix(context, secure=None):
    request = context.get('request', None)
    return full_url(secure=secure, request=request)


@register.filter
def add_full_url_prefix(value, arg=None):

# Path: dju_common/http.py
# def full_url(path=None, secure=None, request=None):
#     if secure is None:
#         secure = dju_settings.USE_HTTPS
#     site = Site.objects.get_current(request)
#     return '{}://{}{}'.format((secure and 'https' or 'http'), site.domain, path or '')
# 
# Path: dju_common/tools.py
# def long_number_readable(value):
#     """
#     Convert big int (>=999) to readable form.
#     1000 => 1k.
#     2333 => 2.3k.
#     1000000 => 1 mln.
#     1258000 => 1.26 mln.
#     """
#     value = int(value)
#     if value < 1000:
#         return value
#     for m, d, inf, fnf, n in _long_number_readable_formats:
#         if value < m:
#             return ((inf if value % d == 0 else fnf) + unicode(n)).format(value / float(d))
#     return value


# Path: dju_common/templatetags/dju_common.py
import simplejson
from django import template
from django.template.loader import get_template
from django.http import QueryDict
from django.utils.safestring import mark_safe, mark_for_escaping
from django.utils.encoding import force_unicode
from dju_common.http import full_url
from dju_common.tools import long_number_readable

    if not type_:
        gv = request_get.urlencode()
    if gv:
        gv = l + gv + r
    return gv


@register.simple_tag(takes_context=True)
def url_getvars(context, token=None):
    return mark_for_escaping(_url_getvars(context, token))


@register.simple_tag(takes_context=True)
def url_getvars_with(context, token):
    return mark_for_escaping(_url_getvars(context, token, 'with'))


@register.simple_tag(takes_context=True)
def url_getvars_without(context, token):
    return mark_for_escaping(_url_getvars(context, token, 'without'))


@register.simple_tag(takes_context=True)
def full_url_prefix(context, secure=None):
    request = context.get('request', None)
    return full_url(secure=secure, request=request)


@register.filter
def add_full_url_prefix(value, arg=None):

    return mark_safe(full_url(path=value, secure=arg))