codysoyland / django-smart-load-tag Goto Github PK
View Code? Open in Web Editor NEWAn attempt to bring namespaces and more control to Django's {% load %} tag.
License: Other
An attempt to bring namespaces and more control to Django's {% load %} tag.
License: Other
With an error like this:
IOError: [Errno 2] No such file or directory: 'build/django-smart-load-tag/README.rst'
You need a MANIFEST.in file that includes README.rst. You should probably also include LICENSE and tests/. Otherwise those files won't be included in the tarball that's upload to PyPI (the one generated by ./setup.py sdist).
I am trying to import a thumbnail tag from a third party app called sorl, located at sorl.thumbnail.templatetags.thumbnail, and I keep on getting the error: "too many values to unpack". It excepts out at C:\Python27\lib\site-packages\smart_load_tag\templatetags\smart_load.py in parse_lib_tag, line 44
Any insight into what the problem is that is causing this issue? I tried both load and import tags.
Hey, thanks for writing this - it makes my life much easier.
One minor suggestion on the docs - throwing a quick install section, that does the 'put it in installed apps', and 'here's how to include it by default' stuff, ie:
urls.py
from django.template import add_to_builtins
add_to_builtins('smart_load_tag.templatetags.smart_load')
Would be happy to make a pull request to save you the time if you'd like!
Thanks again.
add_to_builtins is not working anymore:
from django.template import add_to_builtins add_to_builtins('smart_load_tag.templatetags.smart_load')
See this discussion:
https://code.djangoproject.com/ticket/17085
Tags in Django 1.8:
https://docs.djangoproject.com/en/1.8/howto/custom-template-tags/
This is a really great app, thanks dude!
In my project I have two apps installed, easy_thumbnails and sorl.thumbnail. Both define the 'thumbnail' tag and your app is the perfect solution to solve the conflict.
Unfortunately, the import/load tags from smart_load do not work with app names that have dots, like is the case with the sorl.thumbnail app. The fix is really easy. I am going to submit a fix, a pull request to you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.