mirror of
https://github.com/django-components/django-components.git
synced 2025-11-25 16:39:11 +00:00
Fix modern django compatibility.
This commit is contained in:
parent
d280fa84a8
commit
458b5383e0
3 changed files with 7 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from django import template
|
||||
from django_components.component import registry
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
|
@ -11,7 +12,7 @@ def component_dependencies_tag():
|
|||
for component_class in unique_component_classes:
|
||||
out.append(component_class.render_dependencies())
|
||||
|
||||
return "\n".join(out)
|
||||
return mark_safe("\n".join(out))
|
||||
|
||||
@register.simple_tag(name="component")
|
||||
def component_tag(name, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue