Django 1.10 add media url to static image file -
after update django 1.10 have problem static file images. django add static file path "media" link... example before "/static/images/avatar.jpeg" "/media/static/images/avatar.jpeg"
settings
static_url = '/static/' staticfiles_dirs = ( # put strings here, "/home/html/static" or "c:/www/django/static". # use forward slashes, on windows. # don't forget use absolute paths, not relative paths. os.path.join(base_dir, 'static'), 'static', ) media_root = os.path.join(base_dir, 'media/') media_url = '/media/'
Comments
Post a Comment