~netlandish/django-wiki

4026313b0758769568bae7d8030a9db828faae64 — Raffaele Salmaso 6 years ago c35b09d
Deprecate wiki.urls.get_pattern
3 files changed, 11 insertions(+), 1 deletions(-)

M docs/release_notes.rst
M src/wiki/conf/settings.py
M src/wiki/urls.py
M docs/release_notes.rst => docs/release_notes.rst +1 -0
@@ 40,6 40,7 @@ Deprecated/Removed

 * Django < 1.11 support is dropped :url-issue:`779`
 * Python < 3.3 support is dropped :url-issue:`779` and :url-issue:`792`
 * Deprecate ``wiki.urls.get_pattern`` :url-issue:`799`


django-wiki 0.3.1

M src/wiki/conf/settings.py => src/wiki/conf/settings.py +1 -1
@@ 263,7 263,7 @@ USE_BOOTSTRAP_SELECT_WIDGET = getattr(
URL_CONFIG_CLASS = getattr(
    django_settings,
    'WIKI_URL_CONFIG_CLASS',
    'wiki.urls.WikiURLPatterns')
    None)

#: Search view - dotted path denoting where the search view Class is located.
SEARCH_VIEW = getattr(

M src/wiki/urls.py => src/wiki/urls.py +9 -0
@@ 253,11 253,20 @@ def get_pattern(app_name="wiki", namespace="wiki", url_config_class=None):
       single Django project.
       https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces
    """
    import warnings
    warnings.warn(
        "wiki.urls.get_pattern is deprecated and will be removed in next version, just `include('wiki.urls')` in your urlconf",
        DeprecationWarning
    )
    if url_config_class is None:
        url_config_classname = getattr(settings, 'URL_CONFIG_CLASS', None)
        if url_config_classname is None:
            url_config_class = WikiURLPatterns
        else:
            warnings.warn(
                "URL_CONFIG_CLASS is deprecated and will be removed in next version, override `wiki.sites.WikiSite` instead",
                DeprecationWarning
            )
            url_config_class = import_string(url_config_classname)
    urlpatterns = url_config_class().get_urls()