Esempio n. 1
0
 def ready(self):
     register(checks.check_for_required_installed_apps,
              checks.Tags.required_installed_apps)
     register(checks.check_for_obsolete_installed_apps,
              checks.Tags.obsolete_installed_apps)
     register(checks.check_for_context_processors,
              checks.Tags.context_processors)
     load_wiki_plugins()
Esempio n. 2
0
 def ready(self):
     register(checks.check_for_required_installed_apps,
              checks.Tags.required_installed_apps)
     register(checks.check_for_obsolete_installed_apps,
              checks.Tags.obsolete_installed_apps)
     register(checks.check_for_context_processors,
              checks.Tags.context_processors)
     register(checks.check_for_fields_in_custom_user_model,
              checks.Tags.fields_in_custom_user_model)
     load_wiki_plugins()
Esempio n. 3
0
                urlpatterns += patterns('',
                    url('^_plugin/' + slug + '/', include(root_urlpatterns)),
               )
        return urlpatterns

def get_pattern(app_name="wiki", namespace="wiki", url_config_class=None):
    """Every url resolution takes place as "wiki:view_name".
       You should not attempt to have multiple deployments of the wiki in a
       single Django project.
       https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces
    """
    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:
            url_config_class = get_class_from_str(url_config_classname)
    urlpatterns = url_config_class().get_urls()
    return urlpatterns, app_name, namespace


######################
# PLUGINS
######################

from wiki.core.plugins.loader import load_wiki_plugins

load_wiki_plugins()


Esempio n. 4
0
######################
# Warnings
######################

if not 'south' in django_settings.INSTALLED_APPS:
    warnings.warn(
        "django-wiki: No south in your INSTALLED_APPS. This is highly discouraged."
    )

######################
# PLUGINS
######################

from wiki.core.plugins.loader import load_wiki_plugins

load_wiki_plugins()

from django.core import urlresolvers

original_django_reverse = urlresolvers.reverse


def reverse(*args, **kwargs):
    """Now this is a crazy and silly hack, but it is basically here to
    enforce that an empty path always takes precedence over an article_id
    such that the root article doesn't get resolved to /ID/ but /.
    
    Another crazy hack that this supports is transforming every wiki url
    by a function. If _transform_url is set on this function, it will
    return the result of calling reverse._transform_url(reversed_url)
    for every url in the wiki namespace.
Esempio n. 5
0
 def ready(self):
     register(checks.check_for_required_installed_apps, checks.Tags.required_installed_apps)
     register(checks.check_for_obsolete_installed_apps, checks.Tags.obsolete_installed_apps)
     register(checks.check_for_context_processors, checks.Tags.context_processors)
     load_wiki_plugins()
Esempio n. 6
0
 def ready(self):
     register(checks.check_for_required_installed_apps, checks.Tags.required_installed_apps)
     register(checks.check_for_obsolete_installed_apps, checks.Tags.obsolete_installed_apps)
     register(checks.check_for_context_processors, checks.Tags.context_processors)
     register(checks.check_for_fields_in_custom_user_model, checks.Tags.fields_in_custom_user_model)
     load_wiki_plugins()