Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 1.8 support and bootstrap3-sass readiness #13

Merged
merged 6 commits into from Oct 18, 2015

Conversation

frostbtn
Copy link
Contributor

I've back ported template node walker from django-compressor, so django 1.8+ templating is supported in offline compilation (django and jinja2 engines).

bootstrap3-sass requires 8 as sass compiler' floating point preision; libsass default is 5, this leads to layout problems. I've pulled precision level to settings.py (if not specified, defaults to libsass' default).

I also needed for offline compilation to output .css to the same directory as with SASS_PROCESSOR_ENABLED, so added --use-processor-root switch.

@frostbtn frostbtn mentioned this pull request Oct 15, 2015
@jrief
Copy link
Owner

jrief commented Oct 16, 2015

Huh, this is a huge pull request, thank you very much
I think it will result into a version jump to 0.3.
I will merge it locally and test it in my environment.
My problem is, that due to external constraints, I'm force to use Django-1.7.

@jrief
Copy link
Owner

jrief commented Oct 16, 2015

BTW: Have you seen the function get-setting() introduced in 0.2.5? Could we use that inside .scss files to change the precision, or must we set the precision globally while compiling?

@frostbtn
Copy link
Contributor Author

@jrief, I seen and used custom functions with SASS_PROCESSOR_ENABLED. Yet we need to support this feature in offline compilation as well. I've updated pull request with this.

As for precision, no, as far as I know, talks on include precision changing inside sass are still fresh (sass/sass#1122), and this default 5 is source of... inconvenience... for many UI framework developers. At the moment precision is compiler param, so custom functions can't help here.

@jrief jrief merged commit 496f044 into jrief:master Oct 18, 2015
@jrief
Copy link
Owner

jrief commented Oct 18, 2015

I have merged your pull request with some minor modifications.
Something I could not understand, is the reloading of template_source_loaders in compilescss.py line 121.

Anyway in my project (still using Django-1.7) it works.

Can you please retest everything and add a few lines to the Changelog section. This then will be released as 0.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants