Answer the question
In order to leave comments, you need to log in
How to serve static from the same server in Django?
Guys, hello everyone.
I put my project on centro os.
I set up a virtual environment, moved my project there, connected the database. But when running the command:
python manage.py collectstatic an error appears: [Errno 13] Permission denied: 'static' complete error: take.ms/Tk0sH
My settings.py file:
DEBUG = False
ALLOWED_HOSTS = [
"*"
]
#################
STATIC_URL = '/static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)
STATIC_ROOT = os.path.join(BASE_DIR, "/static/")
MEDIA_ROOT = '/bakot/media/'
MEDIA_URL = '/media/'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question