A Django library bringing paper-ui and core-ui polymer elements to django
Project description
# MaterialDjango
[![Code Health](https://landscape.io/github/Colorless-Green-Ideas/MaterialDjango/master/landscape.svg?style=flat)](https://landscape.io/github/Colorless-Green-Ideas/MaterialDjango/master)
[![PyPI](https://img.shields.io/pypi/v/materialdjango.svg)](https://pypi.python.org/pypi/MaterialDjango)
Polymer Paper-UI widgets and tools for django
# Install
- `pip install materialdjango`
- add `materialdjango` to your INSTALLED_APPS in settings.py
- re-run `manage.py collectstatic`
# Getting Started
- make sure you `{% load staticfiles %}`
- and also add `{% load polymerdep %}` which imports our filter `|dep`
- Add the webcomponents.js shim
- use `dep` to import included polymer html elements (currently 5.0)
Eg:
```html
{% load staticfiles %}
{% load polymerdep %}
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script src="{% static 'materialdjango/components/bower_components/webcomponentsjs/webcomponents-lite.js' %}"></script>
{{ "polymer/polymer.html" | dep}}
{{ "core-scaffold/core-scaffold.html" | dep}}
<...>
```
## I want to go faster
Use my `base.html` template with `vinyl-siding.html` which is imspired by the polymer documentation.
`{% extends "vinyl-siding.html" %}`
[![Code Health](https://landscape.io/github/Colorless-Green-Ideas/MaterialDjango/master/landscape.svg?style=flat)](https://landscape.io/github/Colorless-Green-Ideas/MaterialDjango/master)
[![PyPI](https://img.shields.io/pypi/v/materialdjango.svg)](https://pypi.python.org/pypi/MaterialDjango)
Polymer Paper-UI widgets and tools for django
# Install
- `pip install materialdjango`
- add `materialdjango` to your INSTALLED_APPS in settings.py
- re-run `manage.py collectstatic`
# Getting Started
- make sure you `{% load staticfiles %}`
- and also add `{% load polymerdep %}` which imports our filter `|dep`
- Add the webcomponents.js shim
- use `dep` to import included polymer html elements (currently 5.0)
Eg:
```html
{% load staticfiles %}
{% load polymerdep %}
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script src="{% static 'materialdjango/components/bower_components/webcomponentsjs/webcomponents-lite.js' %}"></script>
{{ "polymer/polymer.html" | dep}}
{{ "core-scaffold/core-scaffold.html" | dep}}
<...>
```
## I want to go faster
Use my `base.html` template with `vinyl-siding.html` which is imspired by the polymer documentation.
`{% extends "vinyl-siding.html" %}`
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MaterialDjango-0.2a1.tar.gz
(334.7 kB
view hashes)
Built Distribution
Close
Hashes for MaterialDjango-0.2a1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ec836b56d571195c7133436e2ab57307794857e4053e6506a9ffda83b2e37b1 |
|
MD5 | 25bb22258645243638882512f38409b2 |
|
BLAKE2b-256 | 704d863ad39b86b537ace575f21eb907ef5ab035fb6579c23e24cfaabbf12f6c |