Is anyone here using `django-tailwind` with a proj...
# general
r
Is anyone here using
django-tailwind
with a project in pants? I'm having issues getting
tailwind start
to recognize my theme app. In my
BUILD
file at the root of
internal_tools
I have my theme app called out as
src/python/bin/internal_tools/theme:theme
In my
settings.py
which is inside the
project
folder I have
internal_tools.theme
in the
INSTALLED_APPS
array and
TAILWIND_APP
is set to
internal_tools.theme
as well. Finally in my
apps.py
for the
theme
app I have the following:
Copy code
class ThemeConfig(AppConfig):
    name = "internal_tools.theme"
I'm not sure what I'm overlooking or if this is a nuance of
django-tailwind
. When I run
tailwind start
I get
CommandError: 'internal_tools.theme' isn't a Tailwind app
h
How are you running
tailwind start
? Is this via
pants run ...
or are you building a pex and running that?
r
pants run /src/python/bin/internal_tools:manage -- tailwind start
h
Ah, yeah, so what that does is build a pex and then run it, which can cause issues with python programs that use syspath magic, and Django's
manage.py
is notorious for stuff like that. E.g.,
runserver
in particular. I don't know enough about tailwind to know if it's susceptible.
But what happens if you
pants run src/python/bin/internal_tools/manage.py -- tailwind start
?
That has slightly different semantics - it runs "directly from source" without building an intermediate pex
r
I still get the same
CommandError: 'internal_tools.theme' isn't a Tailwind app
.
I'm wondering if its the
internal_tools.theme
naming causing issues.
tailwind init
doesn't let you create an app in a subdirectory (or at least its not letting me) so I wonder if trying to have it go into the
internal_tools
path is causing issues.