Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"tailwind init" does not respect dotted app names. #47

Closed
nerdoc opened this issue Feb 1, 2021 · 3 comments
Closed

"tailwind init" does not respect dotted app names. #47

nerdoc opened this issue Feb 1, 2021 · 3 comments

Comments

@nerdoc
Copy link

nerdoc commented Feb 1, 2021

when starting an app usign ./manage.py tailwind init foo - it works flawlessly. Django says that it sort of "recommends" top level directory apps. But the directory structure of bigger projects could be more complicated. Apps are normal python packages which could be installed in any directory, e.g. in one of my projects under the plugins/ directory.

But calling ./manage.py tailwind init plugins.foo tells me that

CommandError: 'plugins.foo' is not a valid app name. Please make sure the name is a valid identifier.

According to the Django docs for AppConfig.name, it is a "full Python path to the application, e.g. 'django.contrib.admin'."

Only the label must be a single Python identifier.
So I think django-tailwind mixes up these two (I too did this in a similar library) - could you correct this?

If I create a tailwind app with tailwind init, and copy the static_src folder + base template manually into another app, or move that whole app directory a level deeper, and set TAILWIND_APP_NAME="plugins.foo - it does work, and I can use tailwind install.

@nerdoc nerdoc changed the title dj-tw mgmt cmd "init" does not respect dotted app names. "tailwind init" does not respect dotted app names. Feb 1, 2021
@timonweb
Copy link
Owner

timonweb commented Feb 1, 2021

Hi thanks for the report. Feel free to fix the issue and push the PR here, I'll happily merge.

@nerdoc
Copy link
Author

nerdoc commented Feb 1, 2021

I'll try my best ;-)

@timonweb timonweb closed this as completed Mar 4, 2021
@nerdoc
Copy link
Author

nerdoc commented Mar 5, 2021

Sorry, I didn't find the time and moved away to django-sockpuppet...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants