I\'m trying to deploy my Django application to the web, but I get the following error:
You\'re using the staticfiles app without having set the STATIC_ROO
If you are using Django 2.2
or greater, your settings file already has a line similar to this:
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Therefore you can easily set static like so:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')