0
0 комментариев

Добрый день, всем. Помогите подключить статику в django

Код setting.py

 MEDIA_ROOT = 'c:/Python27/Scripts/todo/media/'
 
    # URL that handles the media served from MEDIA_ROOT. Make sure to use a
    # trailing slash.
    # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
    MEDIA_URL = '/media/'
 
    # Absolute path to the directory static files should be collected to.
    # Don't put anything in this directory yourself; store your static files
    # in apps' "static/" subdirectories and in STATICFILES_DIRS.
    # Example: "/home/media/media.lawrence.com/static/"
    STATIC_ROOT = 'c:/Python27/Scripts/todo/collected_static/'
 
    # URL prefix for static files.
    # Example: "http://media.lawrence.com/static/"
    STATIC_URL = '/static/'
 
    # Additional locations of static files
    STATICFILES_DIRS = (
        'c:/Python27/Scripts/todo/static/'
        # Put strings here, like "/home/html/static" or "C:/www/django/static".
        # Always use forward slashes, even on Windows.
        # Don't forget to use absolute paths, not relative paths.)


Добавить комментарий