Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

        @register.simple_tag(takes_context=True)
def openonmobile_image_url(context, **kwargs):
    request = context['request']
    url = "%s?url=%s" % (reverse('openonmobile_qr'), request.path)
    if 'rotate' in kwargs:
        url = url + "&rotate=%s" % kwargs['rotate']
    return url
        


src/d/j/django-openonmobile-0.2/openonmobile/tests.py   django-openonmobile(Download)
import middleware
import auth
from templatetags.openonmobile_tags import openonmobile_img, \
                                            openonmobile_image_url
 
            'request': request
        }
        tag = openonmobile_image_url(context)
 
        self.assertEqual(tag, '/qr/?url=/hello/')
            'request': request
        }
        tag = openonmobile_image_url(context,  rotate=45)
 
        self.assertEqual(tag, '/qr/?url=/hello/&rotate=45')