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

Missing styles.css after building styles with modern django-tailwind package (v3.1.1) #22

Open
paulrogov opened this issue Feb 4, 2022 · 0 comments

Comments

@paulrogov
Copy link

paulrogov commented Feb 4, 2022

The current version of django-tailwind (3.1.1) package builds styles.css into this folder:

theme/static/css/dist/styles.css

The previous version used in the video (Intermediate Django - Lesson 19.TailwindCSS Improvements) builds into this one:

theme/static/css/styles.css

So, after deploying it into production you'll get such an error (fullscreen):

And Server Error (500) on the prod.

Solution:
Fix a link to styles.css inside templates/base.html to be this:

<link  href="{% static 'css/dist/styles.css' %}" rel="stylesheet">

p.s.
I also had theme/static/css/dist/styles.css missing from a corresponding git commit at first, because it had turned out to be ignored by .gitignore.

The solution:
Add line !/theme/static/css/dist to .gitignore

@paulrogov paulrogov changed the title Missing styles.css after building styles with modern django-tailwind package Missing styles.css after building styles with modern django-tailwind package (v3.1.1) Feb 4, 2022
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

1 participant