Archived
merge
This commit is contained in:
commit
296aad5a6f
4 files changed
+26
-16
No files matched your search
@@ -115,10 +115,9 @@ INSTALLED_APPS = (
|
||||
'django.contrib.sites',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
# Uncomment the next line to enable the admin:
|
||||
# 'django.contrib.admin',
|
||||
# Uncomment the next line to enable admin documentation:
|
||||
# 'django.contrib.admindocs',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.admindocs',
|
||||
'main'
|
||||
)
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
|
||||
+5
-12
@@ -1,17 +1,10 @@
|
||||
from django.conf.urls import patterns, include, url
|
||||
|
||||
# Uncomment the next two lines to enable the admin:
|
||||
# from django.contrib import admin
|
||||
# admin.autodiscover()
|
||||
from django.contrib import admin
|
||||
admin.autodiscover()
|
||||
|
||||
urlpatterns = patterns('',
|
||||
# Examples:
|
||||
# url(r'^$', 'dusken.views.home', name='home'),
|
||||
# url(r'^dusken/', include('dusken.foo.urls')),
|
||||
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
|
||||
# Uncomment the admin/doc line below to enable admin documentation:
|
||||
# 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('main.urls')),
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
from tastypie.resources import ModelResource
|
||||
from main.models import *
|
||||
|
||||
|
||||
class MemberResource(ModelResource):
|
||||
class Meta:
|
||||
queryset = Member.objects.all()
|
||||
resource_name = 'member'
|
||||
authorization= Authorization() # for dev (VERY INSECURE)
|
||||
@@ -0,0 +1,9 @@
|
||||
from django.conf.urls.defaults import *
|
||||
from myapp.api import MemberResource
|
||||
|
||||
v1_api = Api(api_name='v1')
|
||||
v1_api.register(MemberResource())
|
||||
|
||||
urlpatterns = patterns('',
|
||||
(r'^api/', include(v1_api.urls)),
|
||||
)
|
||||
Reference in new issue
Block a user