File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,23 @@ class LocalizedBleachField(LocalizedField):
99 """Custom version of :see:BleachField that is actually a
1010 :see:LocalizedField."""
1111
12+ DEFAULT_SHOULD_ESCAPE = True
13+
1214 def __init__ (self , * args , escape = True , ** kwargs ):
1315 """Initializes a new instance of :see:LocalizedBleachField."""
1416
1517 self .escape = escape
1618
1719 super ().__init__ (* args , ** kwargs )
1820
21+ def deconstruct (self ):
22+ name , path , args , kwargs = super ().deconstruct ()
23+
24+ if self .escape != self .DEFAULT_SHOULD_ESCAPE :
25+ kwargs ["escape" ] = self .escape
26+
27+ return name , path , args , kwargs
28+
1929 def pre_save (self , instance , add : bool ):
2030 """Ran just before the model is saved, allows us to built the slug.
2131
You can’t perform that action at this time.
0 commit comments