Exemplo n.º 1
0
def autodiscover():
    """
    TODO: document
    """
    from django.contrib.admin import autodiscover as django_autodiscover
    django_autodiscover()

    from copy import copy
    from django.contrib.admin import site as django_site
    registry = copy(django_site._registry)
    registry.update(site._registry)
    site._registry = registry
Exemplo n.º 2
0
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.static import static
from django.contrib.admin import autodiscover as django_autodiscover
from ratelimitbackend import admin

from cms.djangoapps.contentstore.views.organization import OrganizationListView


django_autodiscover()

# Pattern to match a course key or a library key
COURSELIKE_KEY_PATTERN = r'(?P<course_key_string>({}|{}))'.format(
    r'[^/]+/[^/]+/[^/]+', r'[^/:]+:[^/+]+\+[^/+]+(\+[^/]+)?'
)

# Pattern to match a library key only
LIBRARY_KEY_PATTERN = r'(?P<library_key_string>library-v1:[^/+]+\+[^/+]+)'

urlpatterns = patterns(
    '',

    url(r'', include('student.urls')),

    url(r'^transcripts/upload$', 'contentstore.views.upload_transcripts', name='upload_transcripts'),
    url(r'^transcripts/download$', 'contentstore.views.download_transcripts', name='download_transcripts'),
    url(r'^transcripts/check$', 'contentstore.views.check_transcripts', name='check_transcripts'),
    url(r'^transcripts/choose$', 'contentstore.views.choose_transcripts', name='choose_transcripts'),
    url(r'^transcripts/replace$', 'contentstore.views.replace_transcripts', name='replace_transcripts'),
    url(r'^transcripts/rename$', 'contentstore.views.rename_transcripts', name='rename_transcripts'),
    url(r'^transcripts/save$', 'contentstore.views.save_transcripts', name='save_transcripts'),
Exemplo n.º 3
0
def autodiscover():
    django_autodiscover()
    for model, modeladmin in django_site._registry.items():
        if not model in site._registry:
            site.register(model, modeladmin.__class__)