From 1d2a8a69096341f38754e55d8087799063aa6ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Stenstro=CC=88m?= Date: Sun, 14 Jun 2015 14:46:22 +0200 Subject: [PATCH] Update docs to latest version of API. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8abc66de..8e2f483b 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ class Calendar(component.Component): css = {'all': ('[your app]/components/calendar/calendar.css',)} js = ('[your app]/components/calendar/calendar.js',) -component.register(name="calendar", component=Calendar) +component.registry.register(name="calendar", component=Calendar) ``` In your templates, use your component by first importing the django_components tag library, and then using the component_dependencies and component tags to render the component to the page. ```htmldjango -{% load components %} +{% load django_components %} {% block extra_media %}{% component_dependencies %}{% endblock %} {% block main %} {% component name="calendar" date=custom_date %}