mirror of
https://github.com/django-components/django-components.git
synced 2025-12-01 19:11: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
|
|
@ -2,8 +2,11 @@ sudo: false
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "2.7"
|
- "2.7"
|
||||||
- "3.3"
|
|
||||||
- "3.4"
|
- "3.4"
|
||||||
|
- "3.5"
|
||||||
|
- "3.6"
|
||||||
|
- "3.7"
|
||||||
|
- "3.8"
|
||||||
install: pip install tox-travis
|
install: pip install tox-travis
|
||||||
script: tox
|
script: tox
|
||||||
branches:
|
branches:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
from django import template
|
from django import template
|
||||||
from django_components.component import registry
|
from django_components.component import registry
|
||||||
|
from django.utils.safestring import mark_safe
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
|
|
@ -11,7 +12,7 @@ def component_dependencies_tag():
|
||||||
for component_class in unique_component_classes:
|
for component_class in unique_component_classes:
|
||||||
out.append(component_class.render_dependencies())
|
out.append(component_class.render_dependencies())
|
||||||
|
|
||||||
return "\n".join(out)
|
return mark_safe("\n".join(out))
|
||||||
|
|
||||||
@register.simple_tag(name="component")
|
@register.simple_tag(name="component")
|
||||||
def component_tag(name, *args, **kwargs):
|
def component_tag(name, *args, **kwargs):
|
||||||
|
|
|
||||||
2
tox.ini
2
tox.ini
|
|
@ -7,7 +7,7 @@ envlist = py27-django111,py34-django{111,20},py{35,36,37,38}-django{111,20,21,22
|
||||||
3.5 = py35-django{111,20,21,22}
|
3.5 = py35-django{111,20,21,22}
|
||||||
3.6 = py36-django{111,20,21,22}
|
3.6 = py36-django{111,20,21,22}
|
||||||
3.7 = py37-django{111,20,21,22}
|
3.7 = py37-django{111,20,21,22}
|
||||||
3.8 = py37-django{111,20,21,22}
|
3.8 = py38-django{111,20,21,22}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue