Code Monkey home page Code Monkey logo

django-less's People

Contributors

julianwachholz avatar nvbn avatar yetty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

django-less's Issues

Compiled css file not found

I want to include an external less file. I followed the instructions from your README and the css file is created in the LESS_CACHE folder and visible in the filesystem, but the django development server replies with a 404 - Not Found

This is my project: https://github.com/schmittlauch/chorplaner/tree/less

  • the template where I want to use the less file is chor/templates/base.css

unicode in .less breaks

I know that using non ascii characters in css iles is rare but it is allowed and I had to do just that, sadly it breaks
offending line is located in less/templatetags/less.py:

    compiled_file = open(output_path, "w+")
    compiled_file.write(URLConverter(out, os.path.join(STATIC_URL, path)).convert())

I don't know how to repair it though

the error reads:

'ascii' codec can't decode byte

css can be anything with non ascii, mine is

 .external_link:first-child:before {
    content:"Zobacz także:";
}

Errors in less files ignored

When there is an error inside of compiled *.less file (e.g. syntax or include error), no exception is raised. Instead path to uncompiled *.less file is returned by {% less %} tag.

django-less with jade templates

Hi, is there any way to use django-less with other templates than the default ones? I'm using jade-lang with pyjade, and there is no {% load less %} so sompiling less is not posible. Or is it?

If there is not, maybe you could consider supporting other templating engines in some "general" way.

Thanks.

Usage on Mac OS X

Hello,

I am trying to use the template tag for a django application and while trying to setup my development environment on Mac OS X, the less tag is failing with:

[OS Error] No such file or directory

For my less file, which is on the directory i am indicating.
The issue is on line 47 of the less.py file.

Unable to serve in development mode

I'm using Django 1.4.3 in development mode.

The structure of my project:

project/
    manage.py
    core/
        settings.py
        static/
            less-cache/ <---- I want LESS cache to go here
            admin/
                less/
                    base.less <---- the file I want to compile
        ...

settings.py

STATIC_ROOT = ''
STATIC_URL = '/static/'
STATICFILES_DIRS = (
    PROJECT_PATH + '/static/',
)
LESS_OUTPUT_DIR = 'core/static/less-cache/'

("core" is the name of my main application with settings.py).

If I do not specify LESS_OUTPUT_DIR, Django-Less generates LESS_CACHE in the root of my project (and not media root, as docs say...) so I have to point it to my actual static folder using LESS_OUTPUT_DIR.

The problem is:

<link rel="stylesheet" href="{{ STATIC_URL }}{% less "admin/less/base.less" %}" />

turns into

<link rel="stylesheet" href="/static/core/static/less-cache/admin/less/base-6792ecdf72ee.css" />

It gives 404, because in my case the URL should not contain the "core/static" part.

I'm not very experienced with static/media serving in Django (I just picked up those settings from one of the StackOverflow posts), but in my understanding if Django-Less offered a separate setting for URL path, I could easily solve my problem.

Readme.md

The readme.rst contains the lines:
{% endless %}
For me it was throwing an error until corrected to {% endinlineless %}

problems with includes in .less files

I like the idea of your plugin. It is small and unobtrusive, exactly what I need. The only problem I experience is that lessc can not follow included less files like the ones which are coming with bootstrap.

at /var/lib/gems/1.8/gems/less-2.2.1/lib/less/js/lib/less/parser.js:390:69: 'bootstrap/bootstrap.less' wasn't found. (Less::ParseError)
    from /var/lib/gems/1.8/gems/less-2.2.1/lib/less/parser.rb:57:in `to_css'
    from /var/lib/gems/1.8/gems/less-2.2.1/lib/less/java_script/v8_context.rb:90:in `do_lock'
    from /var/lib/gems/1.8/gems/less-2.2.1/lib/less/java_script/v8_context.rb:88:in `do_lock'
    from /var/lib/gems/1.8/gems/less-2.2.1/lib/less/java_script/v8_context.rb:60:in `lock'
    from /var/lib/gems/1.8/gems/less-2.2.1/lib/less/java_script/v8_context.rb:30:in `exec'
    from /var/lib/gems/1.8/gems/less-2.2.1/lib/less/java_script.rb:26:in `exec'    from /var/lib/gems/1.8/gems/less-2.2.1/lib/less/parser.rb:57:in `to_css'
    from /var/lib/gems/1.8/gems/less-2.2.1/bin/lessc:23
    from /usr/local/bin/lessc:19:in `load'
    from /usr/local/bin/lessc:19

Is there an easy remedy for this problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.