Commits

George Notaras committed 3343eb2

User is redirected to the cloned zone's change form after the 'clone zone' action has completed cloning.

Comments (0)

Files changed (1)

src/powerdns_manager/actions.py

 from django.shortcuts import render_to_response
 from django.template import RequestContext
 from django.db.models.loading import cache
+from django.core.urlresolvers import reverse
 
 from powerdns_manager.forms import ZoneTypeSelectionForm
 from powerdns_manager.forms import TtlSelectionForm
             
             messages.info(request, 'Successfully cloned %s zone to %s' % \
                 (domain_obj.name, clone_domain_name))
-            # Return None to display the change list page again.
-            return None
-        
+            
+            # Redirect to the new zone's change form.
+            return HttpResponseRedirect(reverse('admin:%s_domain_change' % app_label, args=(clone_obj.id,)))
+    
     else:
         form = ClonedZoneDomainForm()