diff options
Diffstat (limited to 'chimere/views.py')
-rw-r--r-- | chimere/views.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chimere/views.py b/chimere/views.py index 817aa74..99ecc89 100644 --- a/chimere/views.py +++ b/chimere/views.py @@ -549,17 +549,19 @@ def getGeoObjects(request, area_name, category_ids, status): return HttpResponse(data) def get_available_categories(request, area_name=None, area=None, status='A', - force=None): + force=None): ''' Get categories for a designed area ''' context_data, redir = get_base_response(area_name) area = context_data["area"] - if area and area.dynamic_categories and \ - not "current_extent" in request.GET: - return "" if redir: return redir + if area and area.dynamic_categories and \ + not "current_extent" in request.GET: + context_data['sub_categories'] = [] + return render_to_response('chimere/blocks/categories.html', context_data, + context_instance=RequestContext(request)) if not area or not area.dynamic_categories: # Categories are not updated dynamicaly when the user move the map # so we return ALL the categories |