Changeset - 7b736c4262c5
[Not reviewed]
default
0 1 0
Branko Majic (branko) - 11 years ago 2013-06-30 15:06:53
branko@majic.rs
Fixed the filename generation for project/location iptables.
1 file changed with 2 insertions and 5 deletions:
0 comments (0 inline, 0 general)
conntrackt/views.py
Show inline comments
 
@@ -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:
0 comments (0 inline, 0 general)