X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Fplanetstack%2Furls.py;h=599b20b599ae0747d09a63edfe49b30fc7cbe438;hb=8e672994e36488438962554ce5a3529e34818e9d;hp=cc8375ae9f346385cb8691f0b8e08cddfadf025c;hpb=19f6406329092c19220e7dec8502c265edf2b39c;p=plstackapi.git diff --git a/planetstack/planetstack/urls.py b/planetstack/planetstack/urls.py index cc8375a..599b20b 100644 --- a/planetstack/planetstack/urls.py +++ b/planetstack/planetstack/urls.py @@ -16,26 +16,38 @@ from core.views.slices import SliceList, SliceDetail from core.views.slice_privileges import SlicePrivilegeList, SlicePrivilegeDetail from core.views.slivers import SliverList, SliverDetail from core.views.tags import TagList, TagDetail -from core.views.users import UserList, UserDetail +from genapi import UserList, UserDetail +from core.views.legacyapi import LegacyXMLRPC +#from core.views.analytics import AnalyticsAjaxView from core.models import * from core.api_root import api_root from rest_framework import generics +from core.dashboard.sites import SitePlus +from django.http import HttpResponseRedirect +admin.site = SitePlus() admin.autodiscover() +def redirect_to_apache(request): + """ bounce a request back to the apache server that is running on the machine """ + apache_url = "http://%s%s" % (request.META['HOSTNAME'], request.path) + return HttpResponseRedirect(apache_url) + urlpatterns = patterns('', # Examples: # url(r'^$', 'planetstack.views.home', name='home'), # url(r'^planetstack/', include('planetstack.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: - # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), + url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), + url(r'^', include(admin.site.urls)), + #url(r'^profile/home', 'core.views.home'), url(r'^plstackapi/$', api_root), - + url(r'^plstackapi/deployments/$', DeploymentList.as_view(), name='deployment-list'), url(r'^plstackapi/deployments/(?P[a-zA-Z0-9\-]+)/$', DeploymentDetail.as_view(), name='deployment-detail'), @@ -82,6 +94,12 @@ urlpatterns = patterns('', url(r'^plstackapi/users/$', UserList.as_view(), name='user-list'), url(r'^plstackapi/users/(?P[a-zA-Z0-9_\-]+)/$', UserDetail.as_view(), name='user-detail'), + url(r'^legacyapi/$', 'core.views.legacyapi.LegacyXMLRPC', name='xmlrpc'), + +# url(r'^analytics/(?P\w+)/$', AnalyticsAjaxView.as_view(), name="analytics"), + + url(r'^files/', redirect_to_apache), + #Adding in rest_framework urls url(r'^plstackapi/', include('rest_framework.urls', namespace='rest_framework')),