mirror of
https://github.com/django-components/django-components.git
synced 2025-08-03 13:58:16 +00:00
refactor: rename template_name to template_file (#878)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
b99e32e9d5
commit
d94a459c8d
29 changed files with 251 additions and 138 deletions
|
@ -6,8 +6,8 @@ class Calendar(Component):
|
|||
# Templates inside `[your apps]/components` dir and `[project root]/components` dir
|
||||
# will be automatically found.
|
||||
#
|
||||
# `template_name` can be relative to dir where `calendar.py` is, or relative to COMPONENTS.dirs
|
||||
template_name = "calendar/calendar.html"
|
||||
# `template_file` can be relative to dir where `calendar.py` is, or relative to COMPONENTS.dirs
|
||||
template_file = "calendar/calendar.html"
|
||||
|
||||
css_file = "calendar/calendar.css"
|
||||
js_file = "calendar/calendar.js"
|
||||
|
@ -31,8 +31,8 @@ class CalendarRelative(Component):
|
|||
# Templates inside `[your apps]/components` dir and `[project root]/components` dir
|
||||
# will be automatically found.
|
||||
#
|
||||
# `template_name` can be relative to dir where `calendar.py` is, or relative to COMPONENTS.dirs
|
||||
template_name = "calendar.html"
|
||||
# `template_file` can be relative to dir where `calendar.py` is, or relative to COMPONENTS.dirs
|
||||
template_file = "calendar.html"
|
||||
|
||||
css_file = "calendar.css"
|
||||
js_file = "calendar.js"
|
||||
|
|
|
@ -6,8 +6,8 @@ class CalendarNested(Component):
|
|||
# Templates inside `[your apps]/components` dir and `[project root]/components` dir
|
||||
# will be automatically found.
|
||||
#
|
||||
# `template_name` can be relative to dir where `calendar.py` is, or relative to COMPONENTS.dirs
|
||||
template_name = "calendar.html"
|
||||
# `template_file` can be relative to dir where `calendar.py` is, or relative to COMPONENTS.dirs
|
||||
template_file = "calendar.html"
|
||||
|
||||
css_file = "calendar.css"
|
||||
js_file = "calendar.js"
|
||||
|
|
|
@ -5,4 +5,4 @@ from django_components import Component, register
|
|||
class Todo(Component):
|
||||
# Templates inside `[your apps]/components` dir and `[project root]/components` dir
|
||||
# will be automatically found.
|
||||
template_name = "todo/todo.html"
|
||||
template_file = "todo/todo.html"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue