mirror of
https://github.com/django-components/django-components.git
synced 2025-08-03 05:32:19 +00:00
refactor: Use top-level exports as public API (#562)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
d819f3ff49
commit
e771a0aaaf
30 changed files with 615 additions and 598 deletions
|
@ -1,8 +1,8 @@
|
|||
from django_components import component
|
||||
from django_components import Component, register
|
||||
|
||||
|
||||
@component.register("calendar")
|
||||
class Calendar(component.Component):
|
||||
@register("calendar")
|
||||
class Calendar(Component):
|
||||
# Note that Django will look for templates inside `[your apps]/components` dir and
|
||||
# `[project root]/components` dir. To customize which template to use based on context
|
||||
# you can override def get_template_name() instead of specifying the below variable.
|
||||
|
@ -25,8 +25,8 @@ class Calendar(component.Component):
|
|||
js = "calendar/calendar.js"
|
||||
|
||||
|
||||
@component.register("calendar_relative")
|
||||
class CalendarRelative(component.Component):
|
||||
@register("calendar_relative")
|
||||
class CalendarRelative(Component):
|
||||
# Note that Django will look for templates inside `[your apps]/components` dir and
|
||||
# `[project root]/components` dir. To customize which template to use based on context
|
||||
# you can override def get_template_name() instead of specifying the below variable.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue