Can't attach css files or image to Django template <p>Surfing the internet, I found some solutions of my problem. But it didn't help(<a href="http://stackoverflow.com/questions/15491727/include-css-and-javascript-in-my-django-template">Include CSS and Javascript in my django template</a>) last answer. I added this in <code>urls.py</code>:</p> <pre><code>urlpatterns += patterns('', url(r'^media/(?P&lt;path&gt;.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), ) </code></pre> <p>This is my <code>settings.py</code>:</p> <pre><code>CURRENT_PATH = os.path.abspath(os.path.dirname(__file__).decode('utf-8')) MEDIA_ROOT = os.path.join(CURRENT_PATH, 'media') MEDIA_URL = '/media/' STATIC_ROOT = 'static/' STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(CURRENT_PATH, 'static'), ) </code></pre> <p>And my template:</p> <pre><code>&lt;html&gt; &lt;head lang="en"&gt; &lt;meta charset="UTF-8"&gt; &lt;link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/main.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap.min.css" /&gt; &lt;link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/font-awesome.min" /&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; {% load staticfiles %} &lt;div id="modal" class="modal fade"&gt; &lt;div class="modal-header"&gt; &lt;div&gt;Вхід у систему&lt;/div&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;form action = "/login/" method="post"&gt; &lt;div&gt; &lt;label for="username"&gt;Логін:&lt;/label&gt; {{form.username}} &lt;/div&gt; &lt;div&gt; &lt;label for="password"&gt;Пароль:&lt;/label&gt; {{form.password}} &lt;/div&gt; &lt;br&gt; &lt;div&gt; &lt;input type="submit" value="Submit"&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; &lt;img src="{{STATIC_URL}}ukraine.png" alt="My image"/&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>As the result CSS files are not working and even image isn't found. I created folder for static files: <code>D:\KIT\static\css</code></p>