summaryrefslogtreecommitdiff
path: root/chimere/main/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/main/views.py')
-rw-r--r--chimere/main/views.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/chimere/main/views.py b/chimere/main/views.py
index fc5e4c4..e6e37c2 100644
--- a/chimere/main/views.py
+++ b/chimere/main/views.py
@@ -52,7 +52,7 @@ def get_base_response(area_name=""):
base_url = '/' + area_name + base_url
base_response_dct['extra_url'] = base_url
base_response_dct['area_name'] = area_name
- if settings.CSS_AREAS:
+ if settings.CSS_AREAS and area_name:
base_response_dct['css_area'] = area_name + ".css"
base_response_dct['area_name'] = area_name
return base_response_dct
@@ -131,10 +131,11 @@ def edit(request, area_name=""):
'map_layer':settings.MAP_LAYER,
'form':form,
'extra_head':form.media,
- 'sub_categories':SubCategory.getAvailable(['M', 'B']),
+ 'sub_categories':SubCategory.getAvailable(['M', 'B'],
+ area_name),
'point_widget':PointChooserWidget().render('point', None,
area_name=area_name),
- 'properties':declared_fields
+ 'properties':declared_fields,
})
# manualy populate the custom widget
if 'subcategory' in form.data and form.data['subcategory']:
@@ -170,7 +171,8 @@ def editRoute(request, area_name=""):
'map_layer':settings.MAP_LAYER,
'form':form,
'extra_head':form.media,
- 'sub_categories':SubCategory.getAvailable(['R', 'B']),
+ 'sub_categories':SubCategory.getAvailable(['R', 'B'],
+ area_name),
'route_widget':RouteChooserWidget().render('route', None,
area_name=area_name),
'properties':declared_fields