Skip to content

Commit

Permalink
Adding in sass support. Testing this.
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Romo committed Aug 15, 2016
1 parent 8ec6c20 commit 055ca84
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
12 changes: 12 additions & 0 deletions banded/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
'django.contrib.messages',
'django.contrib.staticfiles',
'storages',
'sass_processor',
'users',

]

MIDDLEWARE = [
Expand Down Expand Up @@ -138,6 +140,16 @@
os.path.join(BASE_DIR, "static"),
)

STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'sass_processor.finders.CssFinder',
)

SASS_PROCESSOR_INCLUDE_DIRS = (
os.path.join(os.path.join(BASE_DIR, "static"), 'scss'),
)




Expand Down
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
boto==2.42.0
Django==1.10
django-appconf==1.0.2
django-compressor==2.1
django-sass-processor==0.4.6
django-storages==1.5.0
gunicorn==19.6.0
libsass==0.11.1
psycopg2==2.6.2
rcssmin==1.0.6
rjsmin==1.0.12
six==1.10.0
3 changes: 0 additions & 3 deletions static/css/base.css

This file was deleted.

6 changes: 6 additions & 0 deletions static/scss/base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.test {
font-size: 100px;
h1 {
color: purple;
}
}
3 changes: 2 additions & 1 deletion static/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% load static %}
{% load sass_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -11,7 +12,7 @@
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<!-- endblock -->
<link rel = 'stylesheet' href = "{% static 'css/base.css' %}">
<link rel = 'stylesheet' href = "{% sass_src 'scss/base.scss' %}" type = 'text/css'>
</head>

<body>
Expand Down
4 changes: 3 additions & 1 deletion static/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
{% if form.errors %}
<p>Error</p>
{% endif %}
<h1 class = 'test'>Boom</h1>
<div class="test">
<h1>Boom</h1>
</div>
<form action = '/u/auth' method = 'post'>
{% csrf_token %}
<label for = 'email'>
Expand Down

0 comments on commit 055ca84

Please sign in to comment.