# HG changeset patch # User Branko Majic # Date 2013-06-30 15:06:53 # Node ID 7b736c4262c59e835fc92b88059d9cee3f74cd9b # Parent 78bdb2323c9066dbc698d56fdb3e0676c45260b3 Fixed the filename generation for project/location iptables. diff --git a/conntrackt/views.py b/conntrackt/views.py --- a/conntrackt/views.py +++ b/conntrackt/views.py @@ -203,13 +203,10 @@ def project_iptables(request, project_id if location_id: location = get_object_or_404(Location, pk=location_id) entities = project.entity_set.filter(location=location) - filename = '%s_%s-iptables.zip' % (project.name, location.name) + filename = '%s-%s-iptables.zip' % (project.name.lower().replace(" ", "_"), location.name.lower().replace(" ", "_")) else: entities = project.entity_set.all() - filename = '%s-iptables.zip' % (project.name) - - # Lower-case the filename, and replace spaces with underscores (_). - filename = filename.lower().replace(" ", "_") + filename = '%s-iptables.zip' % (project.name.lower().replace(" ", "_")) # Render iptables rules for each entity, placing them in the ZIP archive. for entity in entities: