Wiki

Clone wiki

atl-django-component / Home

atl-django-component

It is just an initiative to encapsulate components in django framework.

It is necessary to create a new django application with the following structure:

my_component/
|_ templates/
|___ atl_django_component/
|_____ my_component.html
|_ static/
|___ my_component/
|______ ... # statics elements
|_ __init__.py
|_ my_component.py

In my_component.py we should create our component class inherited from atl_django_component.component.Component

Component structure

  • Class definition, inherited from atl_django_component.Component
  • Template page, by default located in atl_django_component/<component_name>.html but configurable changing the property template

How to use it?

Here is an example of a "Hello World" component

Updated