Added config resource with project base dir and local paths, various other API cleanup.

This commit is contained in:
Chris Church
2013-06-14 23:15:31 -04:00
parent abd81b7492
commit e435951fe4
8 changed files with 163 additions and 83 deletions

View File

@@ -23,22 +23,6 @@ ADMINS = (
MANAGERS = ADMINS
REST_FRAMEWORK = {
'FILTER_BACKEND': 'ansibleworks.main.custom_filters.CustomFilterBackend',
'DEFAULT_PAGINATION_SERIALIZER_CLASS': 'ansibleworks.main.serializers.PaginationSerializer',
'PAGINATE_BY': 25,
'PAGINATE_BY_PARAM': 'page_size',
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
),
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
'ansibleworks.main.renderers.BrowsableAPIRenderer',
),
}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
@@ -148,6 +132,22 @@ INSTALLED_APPS = (
INTERNAL_IPS = ('127.0.0.1',)
REST_FRAMEWORK = {
'FILTER_BACKEND': 'ansibleworks.main.custom_filters.CustomFilterBackend',
'DEFAULT_PAGINATION_SERIALIZER_CLASS': 'ansibleworks.main.pagination.PaginationSerializer',
'PAGINATE_BY': 25,
'PAGINATE_BY_PARAM': 'page_size',
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
),
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
'ansibleworks.main.renderers.BrowsableAPIRenderer',
),
}
# Email address that error messages come from.
SERVER_EMAIL = 'root@localhost'