adde routers file and settings

This commit is contained in:
Sam
2021-01-22 11:01:20 +00:00
parent b051afb627
commit f6614768ab
3 changed files with 32 additions and 1 deletions

View File

@@ -40,6 +40,11 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
# 3rd party
'rest_framework',
'django_filters',
# local apps
'core',
'geo',
'companies',
@@ -103,6 +108,16 @@ AUTH_PASSWORD_VALIDATORS = [
AUTH_USER_MODEL = 'core.CustomUser'
# DRF Options
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticatedOrReadOnly',
],
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework_simplejwt.authentication.JWTAuthentication',
],
'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend']
}
# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/