def network(request): logger = logging.getLogger(__name__) extra_context = {'wizard_title': u'2 de 4 - Configuração de Rede', 'page_name': u'network'} if request.method == "GET": interface = NetworkInterface.get_instance() Form = form(NetworkInterface) extra_context['form'] = Form(instance=interface) return render_to_response( request, "generic.html", extra_context) else: edit_singleton_model(request, "generic.html", "nimbus.wizard.views.timezone", model = NetworkInterface, extra_context = extra_context) interface = NetworkInterface.get_instance() if interface.address == get_raw_network_interface_address(): return redirect( "nimbus.wizard.views.timezone" ) else: logger.info('redirecting user to redirect page') return render_to_response(request, "redirect.html", dict(ip_address=interface.address, url=reverse('nimbus.wizard.views.timezone')))
def offsite(request): extra_context = {'wizard_title': u'3 de 5 - Configuração do Offsite', 'page_name': u'offsite', 'previous': previous_step_url('offsite')} return edit_singleton_model(request, "generic.html", next_step_url('offsite'), formclass = OffsiteForm, extra_context = extra_context)
def timezone(request): extra_context = { 'wizard_title': u'3 de 4 - Configuração de Hora', 'page_name': u'timezone', 'previous': reverse('nimbus.wizard.views.network') } return edit_singleton_model( request, "generic.html", "nimbus.wizard.views.password", formclass = TimezoneForm, extra_context = extra_context )
def timezone(request): extra_context = { 'wizard_title': u'4 de 5 - Configuração de Hora', 'page_name': u'timezone', 'previous': previous_step_url('timezone') } return edit_singleton_model( request, "generic.html", next_step_url('timezone'), formclass = TimezoneForm, extra_context = extra_context, reload_bacula = False)
def offsite(request): extra_context = { 'wizard_title': u'3 de 5 - Configuração do Offsite', 'page_name': u'offsite', 'previous': previous_step_url('offsite') } return edit_singleton_model(request, "generic.html", next_step_url('offsite'), formclass=OffsiteForm, extra_context=extra_context)
def email_conf(request): return views.edit_singleton_model( request, "emailconf.html", "nimbus.reports.views.email_test", formclass = EmailConfForm )
def timezone_conf(request): return edit_singleton_model( request, "timezoneconf.html", "nimbus.timezone.views.timezone_conf", formclass = TimezoneForm )
def network_conf(request): return edit_singleton_model(request, "myform.html", "nimbus.network.views.redirect_after_update", model = NetworkInterface )
def edit(request): title = u'Editar configurações do offsite' return edit_singleton_model(request, "offsite_edit.html", "nimbus.offsite.views.detail", formclass = OffsiteForm, extra_context = locals())