Emil Stenström
48fe8171b4
Reformat lines that became too long. And enforce 119 line length.
2024-02-21 22:38:06 +01:00
Dylan Castillo
91b4accfeb
Render components as views ( #366 ) (thanks @dylanjcastillo)
2024-01-24 22:36:57 +01:00
pre-commit-ci[bot]
0648ad9a93
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2021-09-10 11:12:26 +00:00
Emil Stenström
c0c5a94908
Rename duplicate ComponentRegistryTest.
...
Also move registry test to registry.
2021-03-10 12:25:28 +01:00
Emil Stenström
07986c5216
Caching templates to allow for dynamic template generation
...
Co-authored-by: rbeard0330 <@dul2k3BKW6m>
2021-02-15 21:07:14 +01:00
rbeard0330
2633c3f08f
Pass context into component tags by default, and let components disable with "only" ( #20 )
...
Co-authored-by: rbeard0330 <@dul2k3BKW6m>
2021-01-25 12:31:54 +01:00
Emil Stenström
b2726a6832
Contain all registry logic in helper methods.
2020-06-06 09:07:23 +02:00
Emil Stenström
40ebd6b936
Install isort and fix all imports.
2019-11-24 11:09:14 +01:00
Ryan Hiebert
f219370be2
Use dictionary to compare registry
...
The registry is a dictionary, so comparing items() has a couple of
problems:
1. The order of a dictionary is unstable, so it may not turn out as
expected.
2. items() returns a list in Python 2, but a dict_items in Python 3,
which makes the comparison fail.
2015-06-13 13:42:27 -05:00
Emil Stenström
ebf4ac1d20
Add way to unregister components.
2015-06-11 20:52:46 +02:00
Emil Stenström
00bd40aaaf
Don't allow registering the same component twice.
2015-06-11 20:47:35 +02:00
Emil Stenström
313852ce21
A simple ComponentRegistry to store components.
2015-06-11 20:42:16 +02:00