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: