Forums

Do not display any of the templates on the site with django

This is my settings.py for template:

STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, "assets")]
STATIC_ROOT = os.path.join(BASE_DIR, "static")
MEDIA_ROOT = os.path.join(BASE_DIR, "media")

and this is my collect static:

   306 static files copied to '/home/farzaneh9978/personal-weblog-django/static'.

And this is my web settings for static files:

/static/                            '/home/farzaneh9978/personal-weblog-django/static'
/media/                           '/home/farzaneh9978/personal-weblog-django/media'

I reloaded, but it has no results and only shows some titles. I need your help :(

It looks like you have quotes in the static files mapping section on the Web page -- remove the quotes and reload the web app, if everything else is correct, that should help.

This is my site address : https://farzaneh9978.pythonanywhere.com/

And I do not know what you mean by quotes. Please explain more.

In the last block of code in your opening post (after the words "And this is my web settings for static files") you have static files mappings which have paths surrounded by quotes. Instead of having:

/static/    '/home/.../static'

you should have:

/static/    /home/.../static