Giter VIP home page Giter VIP logo

flask_less's People

Contributors

jrogov avatar mrf345 avatar

Stargazers

 avatar

Forkers

jrogov

flask_less's Issues

wrong path returned for link href

Wrong href is returned to jinja.

Less file: /app_root/static/main.less
Flask-less instantiated in /app_root/__init__.py:

app = Flask('app_root')
app.static_url_path = 'static'
app.static_folder = 'static'
lessc(app=app)

template requesting main.less via {{cssify('main.less')}}

getting 404 not found, but it's looking for the URL /main.css, when it should be looking for /static/main.css

I solved this by importing the code into my own local module, and changing the following (lines 71, 72):

                self.STORAGE[less] = cssRelPath
                return self.returnLink(cssRelPath)

to :

               link_href = '/'.join([self.app.static_url_path, cssRelPath])
               self.STORAGE[less] = link_href
               return self.returnLink(link_href)

Potentially relevant, this is in Flask 2.0.1, with Flask-Less 0.6.

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.