0

I'm working on my project that is basically some type of blog. But I needed to compile different features in one project, which now it can be a problem or maybe not.

In order to work I needed to have STATIC_ROOT and STATICFILES_DIRS but I cannot have them both on same location because I got error (ERRORS: ?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting.)

So I searched for answer and I one guy here on stackoverflow said that he just changed location... he suggested to do it like this...

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'assets_static')
MEDIA_ROOT = ''
MEDIA_URL = '/media/'

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]

For that time it has worked, but now I'm changing some static files and they are not updating. Also, now I have folders static and asset_static. Can someone tell what is the best practice here?

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.