mirror of
https://github.com/django-components/django-components.git
synced 2025-09-11 00:16:17 +00:00
refactor: prefix component ID with c
(#1127)
This commit is contained in:
parent
fc026cbd99
commit
c650e7f3a5
29 changed files with 786 additions and 746 deletions
|
@ -6,6 +6,7 @@ from itertools import chain
|
|||
from types import ModuleType
|
||||
from typing import TYPE_CHECKING, Any, Callable, Iterable, List, Optional, Tuple, Type, TypeVar, Union
|
||||
|
||||
from django_components.constants import UID_LENGTH
|
||||
from django_components.util.nanoid import generate
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -24,7 +25,7 @@ def gen_id() -> str:
|
|||
# See https://zelark.github.io/nano-id-cc/
|
||||
return generate(
|
||||
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||
size=6,
|
||||
size=UID_LENGTH,
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue