matthewwithanm / django-html5boilerplate Goto Github PK
View Code? Open in Web Editor NEWA packaging of Paul Irish's HTML5 Boilerplate for Django projects.
A packaging of Paul Irish's HTML5 Boilerplate for Django projects.
in BeautifulSoup==4.0b module name got changed to bs4
so at line 5 in html5boilerplate_tags.py
from BeautifulSoup import BeautifulSoup is giving 'No module named BeautifulSoup'
install_requires = ['BeautifulSoup>=3.2.0'], # TODO: Relax this requirement a bit. I'm sure it works with a much earlier version.
The HTML5BP google analytics snippet is already using Modernier.load:
Modernizr.load({
load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
});
We could do the same with other js loads via a templatetag.
An example of what we might generate (based on the example from the modernizr docs):
{% loadjsif "Modernizr.geolocation" %}
<script src="{{ STATIC_URL }}main/js/libs/geo.js" type="text/javascript" charset="utf-8"></script>
{% elseloadjs %}
<script src="{{ STATIC_URL }}main/js/libs/geo-polyfill.js" type="text/javascript" charset="utf-8"></script>
{% endloadjsif %}
That might generate something like:
Modernizr.load({
test: Modernizr.geolocation,
yep : '/static/main/js/libs/geo.js',
nope: '/static/main/js/libs/geo-polyfill.js'
});
...or something like that. I wonder if Modernizr.load
could also be useful to the loadjsuntil
templatetag via syntax something like this:
Modernizr.load([
{
load: "//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.js",
complete: function() {
if (!jQuery.ui) {
Modernizr.load('/static/main/js/libs/jquery-ui.min.js');
}
}
}]
I'm not sure if the <script>
tags still make sense in this scenario, but I think it would read pretty clearly in a template. Thoughts?
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.