from django.conf.urls import url from tendenci.apps.user_groups.signals import init_signals from tendenci.apps.site_settings.utils import get_setting from . import views init_signals() urlpath = get_setting('module', 'user_groups', 'url') if not urlpath: urlpath = "groups" urlpatterns = [ url(r'^%s/$' % urlpath, views.search, name='groups'), url(r'^%s/add/$' % urlpath, views.group_add_edit, name='group.add'), url(r'^%s/search/$' % urlpath, views.search_redirect, name='group.search'), url(r'^%s/edit_perms/(?P<id>\d+)/$' % urlpath, views.group_edit_perms, name="group.edit_perms"), url(r'^%s/delete/(?P<id>\d+)/$' % urlpath, views.group_delete, name="group.delete"), url(r'^%s/adduser/redirect/$' % urlpath, views.groupmembership_bulk_add_redirect, name='group.adduser_redirect'), url(r'^%s/import/add/$' % urlpath, views.import_add, name='group.import_add'), url(r'^%s/import/preview/(?P<import_id>\d+)/$' % urlpath, views.import_preview, name='group.import_preview'), url(r'^%s/import/process/(?P<import_id>\d+)/$' % urlpath,
from django.conf.urls.defaults import patterns, url from tendenci.apps.user_groups.signals import init_signals from tendenci.core.site_settings.utils import get_setting init_signals() urlpath = get_setting('module', 'user_groups', 'url') if not urlpath: urlpath = "groups" urlpatterns = patterns('tendenci.apps.user_groups.views', url(r'^%s/$' % urlpath, 'search', name='groups'), url(r'^%s/add/$' % urlpath, 'group_add_edit', name='group.add'), url(r'^%s/search/$' % urlpath, 'search_redirect', name='group.search'), url(r'^%s/edit_perms/(?P<id>\d+)/$' % urlpath, 'group_edit_perms', name="group.edit_perms"), url(r'^%s/delete/(?P<id>\d+)/$' % urlpath, 'group_delete', name="group.delete"), url(r'^%s/adduser/redirect/$' % urlpath, 'groupmembership_bulk_add_redirect', name='group.adduser_redirect'), url(r'^%s/import/add/$' % urlpath, 'import_add', name='group.import_add'), url(r'^%s/import/preview/(?P<import_id>\d+)/$' % urlpath, 'import_preview', name='group.import_preview'), url(r'^%s/import/process/(?P<import_id>\d+)/$' % urlpath, 'import_process', name='group.import_process'), url(r'^%s/import/download_template/$' % urlpath, 'import_download_template', name='group.import_download_template'), url(r'^%s/(?P<group_slug>[-.\w]+)/$' % urlpath, 'group_detail', name='group.detail'), url(r'^%s/(?P<group_slug>[-.\w]+)/message/$' % urlpath, "message", name='group.message'), url(r'^%s/(?P<group_slug>[-.\w]+)/export/(?P<export_target>\w+)/$' % urlpath, 'group_members_export', name='group.members_export'), url(r'^%s/(?P<group_slug>[-.\w]+)/export/(?P<export_target>\w+)/status/(?P<identifier>[_\d]+)/$' % urlpath, 'group_members_export_status', name='group.members_export_status'), url(r'^%s/(?P<group_slug>[-.\w]+)/export/(?P<export_target>\w+)/download/(?P<identifier>[_\d]+)/$' % urlpath, 'group_members_export_download', name='group.members_export_download'), # The following 3 links are old export urls. They are here to help to render # the url template tags for old export in any customized group detail template. # Once the links are rendered, they can be resolved by the pattern
def ready(self): super(UserGroupsConfig, self).ready() from tendenci.apps.user_groups.signals import init_signals, create_notice_types init_signals() post_migrate.connect(create_notice_types, sender=self)