Beispiel #1
0
def atom_feed():
    if 'MUNICIPALITY_NAME' in os.environ.keys():
        title = u'תב"ע פתוחה - %s' % os.environ['MUNICIPALITY_NAME'].decode('utf-8')
    else:
        title = u'תב"ע פתוחה'
    
    return helpers._create_response_atom_feed(request, helpers._get_plans(count=20), feed_title=title).get_response()
Beispiel #2
0
def atom_feed():
    if 'MUNICIPALITY_NAME' in os.environ.keys():
        title = u'תב"ע פתוחה - %s' % os.environ['MUNICIPALITY_NAME'].decode(
            'utf-8')
    else:
        title = u'תב"ע פתוחה'

    return helpers._create_response_atom_feed(request,
                                              helpers._get_plans(count=20),
                                              feed_title=title).get_response()
Beispiel #3
0
def atom_feed_gush(gushim):
    """
    Create a feed for one or more gush IDs.
    The URL format for multiple gushim is something like /gush/12340,12350,12360/plans.atom
    """
    gushim = gushim.split(',')
    if len(gushim) > 1:
        gushim_query = {'gushim': {'$in': gushim}}
    else:
        gushim_query = {'gushim': gushim[0]}
    
    return helpers._create_response_atom_feed(request, helpers._get_plans(query=gushim_query), feed_title=u'תב״ע פתוחה - גוש %s' % ', '.join(gushim)).get_response()
Beispiel #4
0
def atom_feed_gush(gushim):
    """
    Create a feed for one or more gush IDs.
    The URL format for multiple gushim is something like /gush/12340,12350,12360/plans.atom
    """
    gushim = gushim.split(',')
    if len(gushim) > 1:
        gushim_query = {'gushim': {'$in': gushim}}
    else:
        gushim_query = {'gushim': gushim[0]}
    
    muni_name = os.environ.get('MUNICIPALITY_NAME', '').decode('utf-8')
    title = u'תב"ע פתוחה - %s - גוש %s' % (muni_name, ', '.join(gushim)) if muni_name else u'תב"ע פתוחה - גוש %s' % ', '.join(gushim)
    return helpers._create_response_atom_feed(request, helpers._get_plans(query=gushim_query), feed_title=title).get_response()
Beispiel #5
0
def atom_feed_gush(gushim):
    """
    Create a feed for one or more gush IDs.
    The URL format for multiple gushim is something like /gush/12340,12350,12360/plans.atom
    """
    gushim = gushim.split(',')
    if len(gushim) > 1:
        gushim_query = {'gushim': {'$in': gushim}}
    else:
        gushim_query = {'gushim': gushim[0]}

    return helpers._create_response_atom_feed(
        request,
        helpers._get_plans(query=gushim_query),
        feed_title=u'תב״ע פתוחה - גוש %s' % ', '.join(gushim)).get_response()
Beispiel #6
0
def atom_feed_gush(gushim):
    """
    Create a feed for one or more gush IDs.
    The URL format for multiple gushim is something like /gush/12340,12350,12360/plans.atom
    """
    gushim = gushim.split(',')
    if len(gushim) > 1:
        gushim_query = {'gushim': {'$in': gushim}}
    else:
        gushim_query = {'gushim': gushim[0]}

    muni_name = os.environ.get('MUNICIPALITY_NAME', '').decode('utf-8')
    title = u'תב"ע פתוחה - %s - גוש %s' % (muni_name, ', '.join(
        gushim)) if muni_name else u'תב"ע פתוחה - גוש %s' % ', '.join(gushim)
    return helpers._create_response_atom_feed(
        request, helpers._get_plans(query=gushim_query),
        feed_title=title).get_response()
Beispiel #7
0
def atom_feed_gush(gushim):
    """
    Create a feed for one or more gush IDs.
    The URL format for multiple gushim is something like /gush/12340,12350,12360/plans.atom
    """
    gushim = gushim.split(',')
    if len(gushim) > 1:
        gushim_query = {'gushim': {'$in': gushim}}
    else:
        gushim_query = {'gushim': gushim[0]}

    # set the feed title to include municaplity name
    if 'MUNICIPALITY_NAME' in os.environ.keys():
        municaplity_name = os.environ['MUNICIPALITY_NAME'].decode('utf-8')
        title = u'תב"ע פתוחה (%s) - גוש %s' % (municaplity_name,', '.join(gushim))
    else:
        title = u'תב"ע פתוחה - גוש %s' % (','.join(gushim))

    return helpers._create_response_atom_feed(request, helpers._get_plans(query=gushim_query), feed_title=title).get_response()
Beispiel #8
0
def atom_feed():
    muni_name = os.environ.get('MUNICIPALITY_NAME', '').decode('utf-8')
    title = u'תב"ע פתוחה - %s' % muni_name if muni_name else u'תב"ע פתוחה'
    return helpers._create_response_atom_feed(request, helpers._get_plans(count=20), feed_title=title).get_response()
Beispiel #9
0
def atom_feed():
    muni_name = os.environ.get('MUNICIPALITY_NAME', '').decode('utf-8')
    title = u'תב"ע פתוחה - %s' % muni_name if muni_name else u'תב"ע פתוחה'
    return helpers._create_response_atom_feed(request,
                                              helpers._get_plans(count=20),
                                              feed_title=title).get_response()