Dimitris Kougioumtzis Blog About technology

Django settings for manage staticfiles and media

Category Django

Posted on July 17, 2017



Django settings for manage staticfiles and media


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
PUBLIC_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'public'))

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(PUBLIC_DIR, "static")


STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static_src"),
]

STATICFILES_FINDERS = [
     'django.contrib.staticfiles.finders.FileSystemFinder',
     'django.contrib.staticfiles.finders.AppDirectoriesFinder',

]

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(PUBLIC_DIR, "media")

About

My name is Dimitris Kougioumtzis and i work as a Web developer at Rapidbounce Company

Elsewhere