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

Created a tutorial, made some changes to the home page #13

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

evildmp
Copy link
Contributor

@evildmp evildmp commented Jun 2, 2023

No description provided.

Copy link
Owner

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely @evildmp. Thank you! I'm travelling, but will review, merge and deploy this as soon as I'm home.

🥰

@evildmp
Copy link
Contributor Author

evildmp commented Jun 2, 2023 via email


You notice that the page is now rendered rather more attractively.

Next, Tailwind needs to be able to find all Django's templates so it can target them. We'll
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this next work supposed to achieve? I don't see any difference in behaviour or appearance as a result. It's not clear to me what exactly calls that management command, or when.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When one runs the npx tailwind ... command with this setup, it will then shell out the management command to get the full list of templates from Django.

In my own projects I use django-compressor to wrap this up (but have that on the backlist to write up)

I'm thinking of shipping a default base template, and compiled static files, to avoid all this for people. See #6. (Which this PR is definitely Refs... at the least.)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including the <script src="https://cdn.tailwindcss.com"></script> CDN tailwind, makes it just appear nicely straightaway right? (I didn't run it yet.)

(That's not recommended for production, but it may be OK to defer complexity here... — perhaps with a note saying so. 🤔)

docs/source/tutorial.rst Outdated Show resolved Hide resolved

You notice that the page is now rendered rather more attractively.

Next, Tailwind needs to be able to find all Django's templates so it can target them. We'll
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When one runs the npx tailwind ... command with this setup, it will then shell out the management command to get the full list of templates from Django.

In my own projects I use django-compressor to wrap this up (but have that on the backlist to write up)

I'm thinking of shipping a default base template, and compiled static files, to avoid all this for people. See #6. (Which this PR is definitely Refs... at the least.)


You notice that the page is now rendered rather more attractively.

Next, Tailwind needs to be able to find all Django's templates so it can target them. We'll
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including the <script src="https://cdn.tailwindcss.com"></script> CDN tailwind, makes it just appear nicely straightaway right? (I didn't run it yet.)

(That's not recommended for production, but it may be OK to defer complexity here... — perhaps with a note saying so. 🤔)

evildmp and others added 2 commits June 3, 2023 09:16
Copy link
Owner

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @evildmp — right, home 🏡 😊

I've adjusted the end of the tutorial to stop once you're loading Tailwind from the CDN, and then point to the more detailed guide. (It's such a tar-pit: getting tailwind to pick up all Django's templates via the loader is a whole separate topic I think.)

I'm going to merge and deploy this now — I think it's a great addition. Thank you!

Welcome aboard! ⛵️

@carltongibson carltongibson merged commit 3540157 into carltongibson:main Jun 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants