def save_step_type(request, property_id): """Save the step type of the property with given id. """ property = get_object_or_404(Property, pk=property_id) form = StepTypeForm(instance=property, data=request.POST) property = form.save() html = [["#steps", steps_inline(request, property_id)]] result = simplejson.dumps({ "html": html, "message": _(u"Step type has been saved."), }, cls=LazyEncoder) return HttpResponse(result)
def save_step_type(request, property_id): """Save the step type of the property with given id. """ property = get_object_or_404(Property, pk=property_id) form = StepTypeForm(instance=property, data=request.POST) property = form.save() html = [["#steps", steps_inline(request, property_id)]] result = simplejson.dumps( { "html": html, "message": _(u"Step type has been saved."), }, cls=LazyEncoder) return HttpResponse(result)
def save_step_type(request, property_id): """Save the step type of the property with given id. """ property = get_object_or_404(Property, pk=property_id) form = StepTypeForm(instance=property, data=request.POST) property = form.save() # invalidate global properties version number (all product property caches will be invalidated) invalidate_cache_group_id('global-properties-version') html = [["#steps", steps_inline(request, property_id)]] result = simplejson.dumps({ "html": html, "message": _(u"Step type has been saved."), }, cls=LazyEncoder) return HttpResponse(result)
def save_step_type(request, property_id): """Save the step type of the property with given id. """ property = get_object_or_404(Property, pk=property_id) form = StepTypeForm(instance=property, data=request.POST) property = form.save() # invalidate global properties version number (all product property caches will be invalidated) invalidate_cache_group_id('global-properties-version') html = [["#steps", steps_inline(request, property_id)]] result = json.dumps({ "html": html, "message": _(u"Step type has been saved."), }, cls=LazyEncoder) return HttpResponse(result, content_type='application/json')