server/settings.py
changeset 51 032280909e65
parent 33 c71a015191f6
child 77 ee963d1c409b
equal deleted inserted replaced
50:c641b33f910f 51:032280909e65
    30     'django.contrib.contenttypes',
    30     'django.contrib.contenttypes',
    31     'django.contrib.sessions',
    31     'django.contrib.sessions',
    32     'django.contrib.messages',
    32     'django.contrib.messages',
    33     'django.contrib.staticfiles',
    33     'django.contrib.staticfiles',
    34     'rest_framework',
    34     'rest_framework',
       
    35     'rest_framework.authtoken',
    35     'corsheaders',
    36     'corsheaders',
    36     'requests',
    37     'requests',
    37     'taggit',
    38     'taggit',
    38     'ammico',
    39     'ammico',
       
    40     'authentication'
    39 )
    41 )
    40 
    42 
    41 MIDDLEWARE_CLASSES = (
    43 MIDDLEWARE_CLASSES = (
    42     'django.contrib.sessions.middleware.SessionMiddleware',
    44     'django.contrib.sessions.middleware.SessionMiddleware',
    43     'corsheaders.middleware.CorsMiddleware',
    45     'corsheaders.middleware.CorsMiddleware',
    57 
    59 
    58 REST_FRAMEWORK = {
    60 REST_FRAMEWORK = {
    59     # Use Django's standard `django.contrib.auth` permissions,
    61     # Use Django's standard `django.contrib.auth` permissions,
    60     # or allow read-only access for unauthenticated users.
    62     # or allow read-only access for unauthenticated users.
    61     'DEFAULT_PERMISSION_CLASSES': [
    63     'DEFAULT_PERMISSION_CLASSES': [
    62         'rest_framework.authentication.SessionAuthentication'
    64         'rest_framework.authentication.TokenAuthentication'
    63     ]
    65     ]
    64 }
    66 }
    65 
    67 
    66 CACHES = {
    68 CACHES = {
    67     'default': {
    69     'default': {
    68         'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
    70         'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
    69         'LOCATION': 'cacheTable',
    71         'LOCATION': 'cacheTable',
    70     }
    72     }
    71 }
    73 }
       
    74 
       
    75 AUTH_USER_MODEL = 'authentication.AmmicoUser'
       
    76 AUTH_PROFILE_MODULE = 'authentication.Profile'
    72 
    77 
    73 # Internationalization
    78 # Internationalization
    74 # https://docs.djangoproject.com/en/1.7/topics/i18n/
    79 # https://docs.djangoproject.com/en/1.7/topics/i18n/
    75 
    80 
    76 LANGUAGE_CODE = 'en-us'
    81 LANGUAGE_CODE = 'en-us'