Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
 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()
Ejemplo n.º 3
0
 def get_prep_value(self, value):
     with XSSHtml() as parser:
         return parser.clean(value or "")