Python 3, Django 1.7+ compatilibity, some tests.
[fnpdjango.git] / fnpdjango / utils / text / textilepl.py
index 2efde25..21db9ac 100644 (file)
@@ -6,17 +6,16 @@ class TextilePL(Textile):
 
     Changes opening quote to Polish lower-double.
     """
-    glyph_defaults = [(name, repl) 
-        for (name, repl) in Textile.glyph_defaults
-        if name != 'txt_quote_double_open']
-    glyph_defaults.append(('txt_quote_double_open', '„'))
+    glyph_definitions = dict(Textile.glyph_definitions,
+        quote_double_open = '„'
+    )
 
 
 def textile_pl(text):
-    return TextilePL().textile(text)
+    return TextilePL().parse(text)
 
 
 def textile_restricted_pl(text):
     return TextilePL(restricted=True, lite=True,
-                   noimage=True, auto_link=False).textile(
+                   noimage=True, auto_link=False).parse(
                         text, rel='nofollow')