Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate SASS/SCSS with Django

Tags:

sass

django

I want to use SASS/SCSS with Django application.

I followed the link https://bitbucket.org/synic/django-sass. I installed SASS using sudo pip install sass.

When i run Python manage.py runserver,iam getting error as

'sass' is not a valid tag library: Template library sass not found, tried django.templatetags.sass

Can Anyone help me?!

like image 974
CRS... Avatar asked Feb 26 '14 13:02

CRS...


People also ask

How does Django connect to SCSS?

Inside of your template, load in django-sass's library tags and use {% sass_src %} instead of {% static %} to load your SCSS/SASS stylesheet. By default, Django looks inside of the static folder. So we define the file path to our SCSS file relative to the static folder. Navigate over to localhost:8000 and test it out.

Can I use SCSS in SASS?

It makes use of semicolons and brackets like CSS (Cascaded Style Sheets). SASS and SCSS can import each other. Sass actually makes CSS more powerful with math and variable support.

What is SASS SCSS?

SASS is Syntactically Awesome Style Sheets and is an extension of CSS which provides the features of nested rules, inheritance, Mixins whereas SCSS is Sassy Cascaded Style Sheets which is similar to that of CSS and fills the gaps and incompatibilities between CSS and SASS. It was licensed under the MIT license.


1 Answers

python sass (pip install sass) https://pypi.python.org/pypi/sass is different from django-sass (https://bitbucket.org/synic/django-sass)

Download django sass from https://bitbucket.org/synic/django-sass after that install and setup as documented .

like image 114
user3331198 Avatar answered Oct 12 '22 02:10

user3331198