@handle_response_format
@treeio_login_required
@module_admin_required()
def group_add(request, response_format='html'):
 if request.POST:
  if ('cancel' not in request.POST):
   form = GroupForm(request.POST)
   if form.is_valid():
    group = form.save()
    return HttpResponseRedirect(reverse('core_admin_group_view', args=[group.id]))
  else:
   return HttpResponseRedirect(reverse('core_admin_index_groups'))
 else:
  form = GroupForm()
 return render_to_response('core/administration/group_add', {'form': form}, context_instance=RequestContext(request), response_format=response_format)

@ handle_response_format @ treeio_login_required @ module_admin_required ( ) def group_add ( request , response_format = 'html' ) : if request . POST : if ( 'cancel' not in request . POST ) : form = GroupForm ( request . POST ) if form . is_valid ( ) : group = form . save ( ) return HttpResponseRedirect ( reverse ( 'core_admin_group_view' , args = [ group . id ] ) ) else : return HttpResponseRedirect ( reverse ( 'core_admin_index_groups' ) ) else : form = GroupForm ( ) return render_to_response ( 'core/administration/group_add' , { 'form' : form } , context_instance = RequestContext ( request ) , response_format = response_format )
group add view for route .