Commit 8ea2dc22 authored by Miquel Torres's avatar Miquel Torres
Browse files

Remove tastypie dependency

parent 86b29e12
This diff is collapsed.
...@@ -2,28 +2,11 @@ ...@@ -2,28 +2,11 @@
from django.conf.urls.defaults import * from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.views.generic import TemplateView from django.views.generic import TemplateView
from tastypie.api import Api
from codespeed.feeds import LatestEntries from codespeed.feeds import LatestEntries
from codespeed.api import (UserResource, EnvironmentResource,
ProjectResource, ExecutableResource, ReportResource,
BenchmarkResource, ResultResource, BranchResource,
RevisionResource, ResultBundleResource)
feeds = {'latest': LatestEntries} feeds = {'latest': LatestEntries}
rest_api = Api(api_name='v1')
rest_api.register(EnvironmentResource())
rest_api.register(UserResource())
rest_api.register(ProjectResource())
rest_api.register(ExecutableResource())
rest_api.register(BenchmarkResource())
rest_api.register(ResultResource())
rest_api.register(BranchResource())
rest_api.register(RevisionResource())
rest_api.register(ReportResource())
rest_api.register(ResultBundleResource())
urlpatterns = patterns('', urlpatterns = patterns('',
(r'^$', TemplateView.as_view(template_name='home.html')), (r'^$', TemplateView.as_view(template_name='home.html')),
(r'^about/$', TemplateView.as_view(template_name='about.html')), (r'^about/$', TemplateView.as_view(template_name='about.html')),
...@@ -46,5 +29,4 @@ urlpatterns += patterns('codespeed.views', ...@@ -46,5 +29,4 @@ urlpatterns += patterns('codespeed.views',
# URLs for adding results # URLs for adding results
(r'^result/add/json/$', 'add_json_results'), (r'^result/add/json/$', 'add_json_results'),
(r'^result/add/$', 'add_result'), (r'^result/add/$', 'add_result'),
(r'^api/', include(rest_api.urls)),
) )
...@@ -113,12 +113,10 @@ INSTALLED_APPS = ( ...@@ -113,12 +113,10 @@ INSTALLED_APPS = (
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
#'django.contrib.sites',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'codespeed', 'codespeed',
'south', 'south',
'tastypie',
) )
SOUTH_TESTS_MIGRATE = False SOUTH_TESTS_MIGRATE = False
......
...@@ -12,17 +12,7 @@ admin.autodiscover() ...@@ -12,17 +12,7 @@ admin.autodiscover()
urlpatterns = patterns('', urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)), (r'^admin/', include(admin.site.urls)),
)
urlpatterns += patterns(
'',
#('^$', RedirectView.as_view(url='/speed/')),
)
urlpatterns += patterns(
'',
(r'^', include('codespeed.urls')), (r'^', include('codespeed.urls')),
#(r'^speed/', include('codespeed.urls')),
) )
if settings.DEBUG: if settings.DEBUG:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment