(request, domain, app_id, module_unique_id, form_unique_id)
return back_to_main(request, domain, app_id=app_id, module_id=module_id)
Deletes a form from an app
Deletes a form from an app
Deletes a form from an app
def delete_form(request, domain, app_id, module_unique_id, form_unique_id):
    "Deletes a form from an app"
    app = get_app(domain, app_id)
    record = app.delete_form(module_unique_id, form_unique_id)
    if record is not None:
        messages.success(
            request,
            'You have deleted a form. <a href="%s" class="post-link">Undo</a>'
            % reverse('undo_delete_form', args=[domain, record.get_id]),
            extra_tags='html'
        )
        app.save()
        clear_xmlns_app_id_cache(domain)
    try:
        module_id = app.get_module_by_unique_id(module_unique_id).id
    except ModuleNotFoundException as e:
        messages.error(request, str(e))
        module_id = None

    return back_to_main(request, domain, app_id=app_id, module_id=module_id)
def delete_form ( request , domain , app_id , module_unique_id , form_unique_id ) : app = get_app ( domain , app_id ) record = app . delete_form ( module_unique_id , form_unique_id ) if record is not None : messages . success ( request , 'You have deleted a form. <a href="%s" class="post-link">Undo</a>' % reverse ( 'undo_delete_form' , args = [ domain , record . get_id ] ) , extra_tags = 'html' ) app . save ( ) clear_xmlns_app_id_cache ( domain ) try : module_id = app . get_module_by_unique_id ( module_unique_id ) . id except ModuleNotFoundException as e : messages . error ( request , str ( e ) ) module_id = None return back_to_main ( request , domain , app_id = app_id , module_id = module_id )