Created
July 11, 2019 13:18
-
-
Save aballah-chamakh/560b2b8192aa67a7b0d270dec2279704 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # add the account app and all the dependency | |
| INSTALLED_APPS = [ | |
| 'django.contrib.admin', | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.messages', | |
| 'django.contrib.staticfiles', | |
| 'account', | |
| 'Door', | |
| 'corsheaders', | |
| 'rest_framework', | |
| ] | |
| # set the customized user model | |
| AUTH_USER_MODEL = 'account.User' | |
| # allow you api to be accessible | |
| CORS_ORIGIN_ALLOW_ALL = True | |
| # add the CorsMiddleware | |
| MIDDLEWARE = [ | |
| 'django.middleware.security.SecurityMiddleware', | |
| 'django.contrib.sessions.middleware.SessionMiddleware', | |
| 'corsheaders.middleware.CorsMiddleware', # Here | |
| 'django.middleware.common.CommonMiddleware', | |
| 'django.middleware.csrf.CsrfViewMiddleware', | |
| 'django.contrib.auth.middleware.AuthenticationMiddleware', | |
| 'django.contrib.messages.middleware.MessageMiddleware', | |
| 'django.middleware.clickjacking.XFrameOptionsMiddleware', | |
| ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment