Open michael-yin opened 2 years ago
Tried this with my current deployment on Heroku, unfortunately I ran into the problem that I was generating the CSS (using npm run build
) at the heroku-postbuild
stage whereas Python packages (needed to resolve pySitePackages
) are installed after that point. I'm not sure how to run the script late enough to resolve pySitePackages
correctly when deploying on Heroku.
@tok3rat0r
It is better to use Docker to deploy on Heroku.
You can check https://github.com/AccordBox/django-tailwind-alpine-htmx to see how I deploy it on Heroku (which also use this project)
Thx.
Hi @michael-yin!
Is this MR still up-to-date?
Best
Ronny
Hi, @GitRon
This method is still working and I am using it in my projects.
You can merge the PR if you want to.
Thx.
Hi @michael-yin
thanks for your answer! We've already addressed the issue with adding a link to Carltons blog to our docs. Here's the commit: https://github.com/django-crispy-forms/crispy-tailwind/commit/4422619018a3ddac2a7767ad6787f25633cba99a
I know his solution works. Do you think that'll work for you?
Best
Ronny
Supplemental: I still think about adding Carltons solution to this package so people don't have to fiddle around with the configuration.
@GitRon
It seems the solution focus on Django templates.
What if css class are written in Python code? https://github.com/django-crispy-forms/crispy-tailwind/blob/main/crispy_tailwind/layout.py
Would it work?
Thx.
Hi @michael-yin !
As far as I understand Carltons script, all Django apps (also the ones from third-party) will be added for the Tailwind CLI. Please have a look at this management command, and check for yourself.
If you don't agree, I'd be happy to update the docs accordingly.
Best
Ronny
This PR is to help people who got #103 and #110