Commit 9e488164 authored by Gink's avatar Gink

Adds static file loading and base css file

Add static files in mymusiclist/files/ and load them by using {% static [file path starting at /files]%}
parent 1938e131
body {
color: red;
}
\ No newline at end of file
body {
color: red;
}
\ No newline at end of file
......@@ -100,6 +100,13 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
STATICFILES_FINDERS = (
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
)
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "files"),
)
# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/
......@@ -118,6 +125,6 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
STATIC_URL = '/static/'
STATIC_URL = '/files/'
LOGIN_REDIRECT_URL = '/'
......@@ -17,6 +17,7 @@ from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth import views as auth_views
from core import views as core_views
"""import * pls"""
urlpatterns = [
url(r'^login/$', auth_views.login, {'template_name': 'login.html'}, name='login'),
......
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}MyMusicList{% endblock %}</title>
<link rel="stylesheet" href="{% static 'css/mymusiclist.css' %}">
</head>
<body>
<header>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment