Open paulrogov opened 2 years ago
The current version of django-tailwind (3.1.1) package builds styles.css into this folder:
django-tailwind
styles.css
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:
templates/base.html
<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.
.gitignore
The solution: Add line !/theme/static/css/dist to .gitignore
!/theme/static/css/dist
The current version of
django-tailwind
(3.1.1) package buildsstyles.css
into this folder:The previous version used in the video (Intermediate Django - Lesson 19.TailwindCSS Improvements) builds into this one:
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: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