from core.views.tags import TagList, TagDetail
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.plus.sites import SitePlus
+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'^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<pk>[a-zA-Z0-9\-]+)/$', DeploymentDetail.as_view(), name='deployment-detail'),
url(r'^legacyapi/$', 'core.views.legacyapi.LegacyXMLRPC', name='xmlrpc'),
+# url(r'^analytics/(?P<name>\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')),