Skip to main content

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" %}`

Project details


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)

Uploaded Source

Built Distribution

MaterialDjango-0.2a1-py2-none-any.whl (3.3 MB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page