Commit a468778e authored by Andreas Burbach's avatar Andreas Burbach
Browse files

Update social_network/

parent 58025050
Pipeline #89807 passed with stages
in 3 minutes and 28 seconds
......@@ -25,7 +25,19 @@ If you not have already created a django python project, [create](https://docs.d
This will create a **mysite** directory in your current directory.
Open the **mysite** directory and open the ****.
Add *'the_social_network'* to **INSTALLED_APPS** and save the file.
We need to make some changes in this file:
- Add ```import os``` at the very first begining of the file.
- Add ```ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split(",")``` where ```ALLOWED_HOSTS = []```
- Add ```CORS_ORIGIN_ALLOW_ALL = bool(os.environ.get("CORS_ORIGIN_ALLOW_ALL", True))```directly after ```ALLOWED_HOSTS```
- Add ```'corsheaders', 'the_social_network', 'rest_framework', 'rest_framework.authtoken'``` to **INSTALLED_APPS**
- Add ```'corsheaders.middleware.CorsMiddleware'``` at the start of **MIDDLEWARE**
- Add ```# REST Framework settings
after ```STATIC_URL = '/static/'```
Next open the and add the following lines to your **urlpatterns**
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment