remove admin, add plugin system for openslides
This commit is contained in:
parent
f889c49c1b
commit
bb430fd2a7
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
openslides.agenda.admin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Register app for admin site.
|
||||
|
||||
:copyright: 2011 by the OpenSlides team, see AUTHORS.
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.contrib import admin
|
||||
from mptt.admin import MPTTModelAdmin
|
||||
|
||||
from openslides.agenda.models import Item
|
||||
|
||||
admin.site.register(Item, MPTTModelAdmin)
|
@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
openslides.application.admin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Register app for admin site.
|
||||
|
||||
:copyright: 2011 by the OpenSlides team, see AUTHORS.
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.contrib import admin
|
||||
from openslides.application.models import Application, AVersion
|
||||
|
||||
admin.site.register(Application)
|
||||
admin.site.register(AVersion)
|
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
openslides.assignment.admin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Register app for admin site.
|
||||
|
||||
:copyright: 2011 by the OpenSlides team, see AUTHORS.
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.contrib import admin
|
||||
from assignment.models import Assignment
|
||||
|
||||
admin.site.register(Assignment)
|
@ -22,3 +22,11 @@ LANGUAGE_CODE = 'de'
|
||||
|
||||
# Make this unique, and don't share it with anybody.
|
||||
SECRET_KEY = '=(v@$58k$fcl4y8t2#q15y-9p=^45y&!$!ap$7xo6ub$akg-!5'
|
||||
|
||||
# Put your OpenSlides Plugins in this List
|
||||
INSTALLED_PLUGINS = (
|
||||
|
||||
)
|
||||
|
||||
|
||||
INSTALLED_APPS += INSTALLED_PLUGINS
|
||||
|
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
openslides.participant.admin
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Register app for admin site.
|
||||
|
||||
:copyright: 2011 by the OpenSlides team, see AUTHORS.
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.contrib import admin
|
||||
from participant.models import Profile
|
||||
|
||||
admin.site.register(Profile)
|
@ -14,12 +14,13 @@ from django.conf.urls.defaults import *
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.views.generic import RedirectView
|
||||
from django.utils.importlib import import_module
|
||||
import settings
|
||||
|
||||
admin.autodiscover()
|
||||
handler500 = 'openslides.utils.views.server_error'
|
||||
|
||||
urlpatterns = patterns('',
|
||||
(r'^admin/', include(admin.site.urls)),
|
||||
|
||||
# frontpage
|
||||
(r'^$', RedirectView.as_view(
|
||||
url='projector/control',
|
||||
@ -36,6 +37,15 @@ urlpatterns = patterns('',
|
||||
(r'^i18n/', include('django.conf.urls.i18n')),
|
||||
)
|
||||
|
||||
for plugin in settings.INSTALLED_PLUGINS:
|
||||
try:
|
||||
mod = import_module(plugin + '.urls')
|
||||
except (ImportError):
|
||||
continue
|
||||
|
||||
plugin_name = mod.__name__.split('.')[0]
|
||||
urlpatterns += patterns('', (r'^%s/' % plugin_name, include('%s.urls' % plugin_name)))
|
||||
|
||||
|
||||
urlpatterns += patterns('',
|
||||
(r'^500/$', 'openslides.utils.views.server_error'),
|
||||
|
Loading…
Reference in New Issue
Block a user