from django.conf.urls.defaults import * from django.conf import settings from django.views.generic.simple import direct_to_template from seahub.views import root, peers, myhome, \ repo, repo_history, modify_token, remove_repo, sys_seafadmin, sys_useradmin, \ org_seafadmin, org_useradmin, org_group_admin, org_remove, \ activate_user, user_add, user_remove, sys_group_admin, sys_org_admin, \ ownerhome, repo_history_dir, repo_history_revert, \ user_info, repo_set_access_property, repo_access_file, \ repo_remove_share, repo_download, org_info, \ seafile_access_check, back_local, repo_history_changes from seahub.notifications.views import notification_list from seahub.share.views import share_admin # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^seahub/', include('seahub.foo.urls')), # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: # (r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: #(r'^admin/', include(admin.site.urls)), (r'^accounts/', include('base.registration_urls')), (r'^$', root), #url(r'^home/$', direct_to_template, { 'template': 'home.html' } ), url(r'^home/my/$', myhome, name='myhome'), url(r'^home/owner/(?P[^/]+)/$', ownerhome, name='ownerhome'), (r'^share/', include('share.urls')), url(r'^shareadmin/$', share_admin, name='share_admin'), (r'^shareadmin/removeshare/$', repo_remove_share), url(r'^repo/(?P[^/]+)/$', repo, name='repo'), (r'^repo/history/(?P[^/]+)/$', repo_history), (r'^repo/history/dir/(?P[^/]+)/$', repo_history_dir), (r'^repo/history/revert/(?P[^/]+)/$', repo_history_revert), # (r'^repo/token/modify/(?P[^/]+)/$', modify_token), (r'^repo/history/changes/(?P[^/]+)/$', repo_history_changes), (r'^repo/remove/(?P[^/]+)/$', remove_repo), # (r'^repo/removefetched/(?P[^/]+)/(?P[^/]+)/$', remove_fetched_repo), # (r'^repo/setap/(?P[^/]+)/$', repo_set_access_property), (r'^repo/(?P[^/]+)/(?P[^/]+)/$', repo_access_file), (r'^download/repo/$', repo_download), (r'^seafile_access_check/$', seafile_access_check), url(r'^org/remove/(?P[\d]+)/$', org_remove, name="org_remove"), (r'^org/$', org_info), (r'^back/local/$', back_local), (r'^useradmin/add/$', user_add), (r'^useradmin/remove/(?P[^/]+)/$', user_remove), (r'^useradmin/info/(?P[^/]+)/$', user_info), (r'^useradmin/activate/(?P[^/]+)/$', activate_user), ### Apps ### (r'^avatar/', include('avatar.urls')), (r'^notification/', include('notifications.urls')), url(r'^sys/notificationadmin/', notification_list, name='notification_list'), (r'^contacts/', include('contacts.urls')), (r'^group/', include('seahub.group.urls')), (r'^profile/', include('seahub.profile.urls')), ### SeaHub admin ### (r'^sys/seafadmin/$', sys_seafadmin), url(r'^sys/useradmin/$', sys_useradmin, name='sys_useradmin'), url(r'^sys/orgadmin/$', sys_org_admin, name='sys_org_admin'), url(r'^sys/groupadmin/$', sys_group_admin, name='sys_group_admin'), ### Org admin ### (r'^seafadmin/$', org_seafadmin), url(r'^useradmin/$', org_useradmin, name='org_useradmin'), url(r'^groupadmin/$', org_group_admin, name='org_group_admin'), ) if settings.DEBUG: media_url = settings.MEDIA_URL.strip('/') urlpatterns += patterns('', (r'^%s/(?P.*)$' % (media_url), 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), )