Explorar o código

fix widget name

zhangfisher %!s(int64=12) %!d(string=hai) anos
pai
achega
d9aa3d939e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      DjangoUeditor/widgets.py

+ 1 - 1
DjangoUeditor/widgets.py

@@ -110,7 +110,7 @@ class UEditorWidget(forms.Textarea):
         #传入模板的参数
         editor_id="id_%s" % name.replace("-", "_")
         uSettings={
-            "name": name.replace("-", "_"),
+            "name": name,
             "id": editor_id,
             "value":value
         }