Changing the place templates (Django)

Asked

Viewed 95 times

0

I was trying to leave the templates folder (main) out of the 'core' folder because I actually wanted to leave the 'templates' and 'Static' folder out of the 'core' folder'.

Check out my project on Github.

Then I tried to do the following in Settings.py:

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'semantic', 'templates'), ],
        ...
    }

STATIC_URL = '/static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'semantic', 'staticfiles'),)
STATIC_ROOT = os.path.join(BASE_DIR, 'semantic', 'static')

But this way it loads the templates, but does not load the 'Static''.

What I do?

1 answer

0

Execute the command:

./manage.py collectstatic

Browser other questions tagged

You are not signed in. Login or sign up in order to post.