1. Simon Meers
  2. django-dbgettext


Simon Meers  committed ea991df

Subclassing Token documentation

  • Participants
  • Parent commits a1136ae
  • Branches default

Comments (0)

Files changed (1)

File docs/parsing.rst

View file
     registry.register(Text, TextOptions)
+Subclassing Token
+    provide this method if your entire ``Token`` should be be displayed as a placeholder -- e.g. ``%(get_key_output_here)s``
+    provide this method if your ``Token`` requires inner translation -- it should return ``self.raw`` with any inner translatable parts already gettexted
+    this method should return a list of any translatable strings within your ``Token`` (again, only required for inner translation)
 .. _custom_parsing:
 Other Parsing?