Skip to content

Instantly share code, notes, and snippets.

@jazztpt
Created June 7, 2011 21:30
Show Gist options
  • Save jazztpt/1013224 to your computer and use it in GitHub Desktop.
Save jazztpt/1013224 to your computer and use it in GitHub Desktop.
Valentunes urls.py with basic api
from django.conf.urls.defaults import *
from tastypie.api import Api
from myapp.api import EntryResource, UserResource
v1_api = Api(api_name = 'v1')
v1_api.register(CardResource())
v1_api.register(TrackResource())
mobile_api = Api(api_name='mobile')
mobile_api.register(CardResource())
mobile_api.register(TrackResource())
urlpatterns = patterns('',
# The normal jazz here...
(r'^blog/', include('myapp.urls')),
(r'^api/', include(v1_api.ruls)),
(r'^api/', include(mobile_api.urls)),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment