@@ -23,6 +23,8 @@ class StructureOptions(TypedDict):
2323 single_module_name : str | None
2424 database_type : str
2525 use_database_url : bool
26+ use_tailwind : bool
27+ use_htmx : bool
2628 use_github : bool
2729 use_gitlab : bool
2830
@@ -171,6 +173,12 @@ def get_database_type_choice(self) -> str:
171173
172174 return self ._get_selection ("Choose database:" , choices , default = "postgresql" )
173175
176+ def get_tailwind_choice (self ) -> bool :
177+ return UIFormatter .confirm ("Include Tailwind CSS? (via django-tailwind-cli)" , default = True )
178+
179+ def get_htmx_choice (self ) -> bool :
180+ return UIFormatter .confirm ("Include HTMX? (via django-htmx)" , default = True )
181+
174182 def _get_structure_metadata (self , options : StructureOptions ) -> Tuple [str , str , list [str ], dict ]:
175183 """Helper method to generate metadata dictionary."""
176184 project_dir = options ["project_dir" ]
@@ -193,6 +201,8 @@ def _get_structure_metadata(self, options: StructureOptions) -> Tuple[str, str,
193201 nested_dir = "apps" if not options ["single" ] else None ,
194202 use_database_url = options ["use_database_url" ],
195203 database_type = options ["database_type" ],
204+ use_tailwind = options .get ("use_tailwind" , False ),
205+ use_htmx = options .get ("use_htmx" , False ),
196206 predefined_structure = options ["predefined" ],
197207 unified_structure = options ["unified" ],
198208 single_structure = options ["single" ],
@@ -250,6 +260,10 @@ def get_user_input() -> Tuple[str, str, str, list, dict]:
250260 database_type = collector .get_database_type_choice ()
251261 use_database_url = collector .get_database_config_choice ()
252262
263+ # Step 3: Tailwind and HTMX
264+ use_tailwind = collector .get_tailwind_choice ()
265+ use_htmx = collector .get_htmx_choice ()
266+
253267 # Step 3: Django Apps (Standard only)
254268 nested = False
255269 nested_dir = None
@@ -273,6 +287,8 @@ def get_user_input() -> Tuple[str, str, str, list, dict]:
273287 nested_dir = nested_dir ,
274288 use_database_url = use_database_url ,
275289 database_type = database_type ,
290+ use_tailwind = use_tailwind ,
291+ use_htmx = use_htmx ,
276292 )
277293 return project_dir , project_name , app_names [0 ], app_names , metadata .to_dict ()
278294 else :
@@ -284,6 +300,8 @@ def get_user_input() -> Tuple[str, str, str, list, dict]:
284300 single_module_name = single_module_name ,
285301 database_type = database_type ,
286302 use_database_url = use_database_url ,
303+ use_tailwind = use_tailwind ,
304+ use_htmx = use_htmx ,
287305 use_github = use_github ,
288306 use_gitlab = use_gitlab ,
289307 )
@@ -316,6 +334,12 @@ def confirm_setup(project_dir: str, project_name: str, app_names: list, metadata
316334 db_type = metadata .get ("database_type" , "postgresql" ).capitalize ()
317335 console .print (f"[{ UIColors .HIGHLIGHT } ]Database Type:[/{ UIColors .HIGHLIGHT } ] { db_type } " )
318336
337+ use_tailwind = "Yes" if metadata .get ("use_tailwind" , False ) else "No"
338+ console .print (f"[{ UIColors .HIGHLIGHT } ]Tailwind CSS:[/{ UIColors .HIGHLIGHT } ] { use_tailwind } " )
339+
340+ use_htmx = "Yes" if metadata .get ("use_htmx" , False ) else "No"
341+ console .print (f"[{ UIColors .HIGHLIGHT } ]HTMX:[/{ UIColors .HIGHLIGHT } ] { use_htmx } " )
342+
319343 console .print ()
320344 UIFormatter .print_separator ()
321345 console .print ()
0 commit comments