class LinkPlugin(BasePlugin): slug = 'links' urlpatterns = {'article': patterns('', url(r'^json/query-urlpath/$', views.QueryUrlPath.as_view(), name='links_query_urlpath'), )} sidebar = {'headline': _('Links'), 'icon_class': 'fa-bookmark', 'template': 'wiki/plugins/links/sidebar.html', 'form_class': None, 'get_form_kwargs': (lambda a: {})} wikipath_config = [ ('base_url', reverse_lazy('wiki:get', kwargs={'path': ''})), ('default_level', settings.LOOKUP_LEVEL), ] markdown_extensions = [ urlize_makeExtension(), WikiPathExtension(wikipath_config)] def __init__(self): pass
class LinkPlugin(BasePlugin): slug = "links" urlpatterns = { "article": [ re_path( r"^json/query-urlpath/$", views.QueryUrlPath.as_view(), name="links_query_urlpath", ), ] } sidebar = { "headline": _("Links"), "icon_class": "fa-bookmark", "template": "wiki/plugins/links/sidebar.html", "form_class": None, "get_form_kwargs": (lambda a: {}), } wikipath_config = [ ("base_url", reverse_lazy("wiki:get", kwargs={"path": ""})), ("default_level", settings.LOOKUP_LEVEL), ] markdown_extensions = [urlize_makeExtension(), WikiPathExtension(wikipath_config)]