@register.inclusion_tag('adzone/ad_tag.html', takes_context=True)
def random_zone_ad(context, ad_zone):
    to_return = {}

    # Retrieve a random ad for the zone
    ad = AdBase.objects.get_random_ad(ad_zone)
    to_return['ad'] = ad

    # Record a impression for the ad
    if 'from_ip' in context and ad:
        from_ip = context.get('from_ip')
        try:
            impression = AdImpression(
                ad=ad, impression_date=datetime.now(), source_ip=from_ip)
            impression.save()
        except:
            pass
    return to_return
get_request(url='', url_params={})
dataset/ETHPy150Open andrewebdev/django-adzone/adzone/templatetags/adzone_tags.py/random_zone_ad--crossover with--dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/http.py/get_request