Skip to content

Commit b7e1702

Browse files
committed
Fix startunicorn error. #142
1 parent e0aa01b commit b7e1702

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

django_unicorn/management/commands/startunicorn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
from django.core.management.base import BaseCommand, CommandError
44

5-
from ...components import convert_to_camel_case, convert_to_snake_case
5+
from ...components import convert_to_pascal_case, convert_to_snake_case
66

77

88
COMPONENT_FILE = """from django_unicorn.components import UnicornView
99
1010
11-
class {camel_case_component_name}View(UnicornView):
11+
class {pascal_case_component_name}View(UnicornView):
1212
pass
1313
"""
1414

@@ -34,7 +34,7 @@ def handle(self, *args, **options):
3434

3535
for component_name in options["component_names"]:
3636
snake_case_component_name = convert_to_snake_case(component_name)
37-
camel_case_component_name = convert_to_camel_case(component_name)
37+
pascal_case_component_name = convert_to_pascal_case(component_name)
3838

3939
# Create component
4040
if not Path("unicorn/components").exists():
@@ -43,7 +43,7 @@ def handle(self, *args, **options):
4343
component_path = Path(f"unicorn/components/{snake_case_component_name}.py")
4444
component_path.write_text(
4545
COMPONENT_FILE.format(
46-
**{"camel_case_component_name": camel_case_component_name}
46+
**{"pascal_case_component_name": pascal_case_component_name}
4747
)
4848
)
4949
self.stdout.write(self.style.SUCCESS(f"Created {component_path}."))

0 commit comments

Comments
 (0)