this is my setting.py file
BUILT_INS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
)
THIRD_PARTY_APPS = (
'casper',
'widget_tweaks',
'django_coverage',
'social.apps.django_app.default',
'rest_framework',
)
CUSTOM_APPS = (
'dashboard',
'generator',
'shorturl',
'api',
)
INSTALLED_APPS = BUILT_INS + THIRD_PARTY_APPS + CUSTOM_APPS
Middleware
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
#'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
Authentication
AUTHENTICATION_BACKENDS = (
'social.backends.google.GoogleOAuth2',
'social.backends.twitter.TwitterOAuth',
'social.backends.facebook.FacebookOAuth2',
#'social.backends.facebook.FacebookAppOAuth2',
#'social.backends.google.GoogleOpenId',
#'social.backends.google.GoogleOAuth',
'django.contrib.auth.backends.ModelBackend',
)
Some other stuff
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
'social.apps.django_app.context_processors.backends',
'social.apps.django_app.context_processors.login_redirect',
)
ROOT_URLCONF = 'qrcvault.urls'
WSGI_APPLICATION = 'qrcvault.wsgi.application'
Database
https://docs.djangoproject.com/en/1.6/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
Internationalization
https://docs.djangoproject.com/en/1.6/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
Static files (CSS, JavaScript, Images)
https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
python-social-auth settings
http://psa.matiasaguirre.net/
django-rest-framework stuff
REST_FRAMEWORK = {
# Use hyperlinked styles by default.
# Only used if the serializer_class
attribute is not set on a view.
'DEFAULT_MODEL_SERIALIZER_CLASS':
'rest_framework.serializers.HyperlinkedModelSerializer',
# Use Django's standard `django.contrib.auth` permissions,
# or allow read-only access for unauthenticated users.
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
]
}