def post(self, request): for k, v in request.data.items(): if k == "website_footer": with XSSHtml() as parser: v = parser.clean(v) setattr(SysOptions, k, v) return self.success()
def post(self, request): self.serializer_class = CreateEditWebsiteConfigSerializer for k, v in request.data.items(): if k == "website_footer": with XSSHtml() as parser: v = parser.clean(v) setattr(SysOptions, k, v) return self.success()
def get_prep_value(self, value): with XSSHtml() as parser: return parser.clean(value or "")