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

Add resources section to the documentation #2081

Merged
merged 3 commits into from
Feb 25, 2025

Conversation

dr-rompecabezas
Copy link
Member

Description

This PR adds a new "Resources" section to the documentation that provides a curated list of tutorials and talks about Django Debug Toolbar.

  • The criteria used to select the links for inclusion were added to the page.
  • The link to the new page was placed on the menu after all the links related to installation, configuration, and overview of the toolbar, and just above the changelog, i.e., the first "metadata" link.
  • The changes were tested by building the docs locally with Sphinx.

Closes #2070

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

Sorry, something went wrong.

@dr-rompecabezas
Copy link
Member Author

I see four lines are too long. I'll fix the issue right away.

@dr-rompecabezas
Copy link
Member Author

The CI failed due to a spell check.

 resources.rst:34: : Spell check: Webapp: A Related Matter: Optimizing Your Webapp by Using Django Debug Toolbar.

I see no point in adding this word to spelling_wordlist.txt so I'll change it to "Web App" and try again.

Verified

This commit was signed with the committer’s verified signature.
osazos Olivier
This commit adds a new section to the documentation, "Resources", which
provides a curated list of tutorials and talks.

Issue django-commons#2070
@matthiask
Copy link
Member

If you look at the test runs you can see that we have unrelated failures because of a CSP related change. Maybe the package has been upgraded and our tests aren't compatible yet? You could try running the tests locally using tox, maybe while regenerating the vent so that you get new versions of all dependencies. And maybe find a django-csp version which still works, and we can fix the underlying issue later?

@dr-rompecabezas
Copy link
Member Author

@matthiask thanks for the feedback and pointers for investigating.

The error message in the test failures suggests our tests fail due to the middleware order.

The tests passed a few days ago with version 4.0b2 of the django-csp package. They are failing in the latest release 4.0b3.

See the commit that added the error message we see raised in our tests, as well as the related issue and discussion.

# csp/middleware.py
    @staticmethod
    def _csp_nonce_post_response() -> None:
        raise CSPNonceError(
            "The 'csp_nonce' attribute is not available after the CSP header has been written. Consider adjusting your MIDDLEWARE order."
        )

In our tests, we append the CSPMiddleware to the end of the list.

For example:

    @override_settings(
        MIDDLEWARE=settings.MIDDLEWARE + ["csp.middleware.CSPMiddleware"]
    )
    def test_exists(self):
    ...

That's as far as I've gotten. I will resume investigating later and may attempt to tweak the middleware order in our tests after researching further.

Copy link
Member

@tim-schilling tim-schilling left a comment

Choose a reason for hiding this comment

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

I really like what you have here! This is excellent work. I've got thoughts on some things we may want to do differently. If you disagree, please let me know.

- Favor conference site links and DjangoTV over YouTube
- Make the invitation to contribute more inviting
- Remove the criteria for inclusion and contributing sections

django-commons#2070
@tim-schilling
Copy link
Member

I'll try to take a closer look at this over the weekend. I suspect there's a doc building error in this though. I think you might be able to reproduce it with tox -e docs. The syntax around :doc: doesn't look quite right to me, but I could be wrong.

I'm also going to add https://djangotv.com/videos/djangocon-us/2015/djangocon-us-2015-but-why-is-the-admin-slow-by-jacinda-shelly/ to the list of content. While it is a bit old, it looks like it covers a core aspect of how to use the toolbar as a debugging tool.

@tim-schilling
Copy link
Member

Never mind on tox -e docs. That is passing. Did you happen to generate the docs locally to see how the page gets rendered?

@dr-rompecabezas
Copy link
Member Author

Yes, I built the docs locally to check that everything rendered correctly.

Copy link
Member

@tim-schilling tim-schilling left a comment

Choose a reason for hiding this comment

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

🚀 Thank you @dr-rompecabezas!

@tim-schilling tim-schilling merged commit e5c9561 into django-commons:main Feb 25, 2025
25 checks passed
@dr-rompecabezas dr-rompecabezas deleted the docs-talks branch March 5, 2025 02:35
dr-rompecabezas added a commit to dr-rompecabezas/django-debug-toolbar that referenced this pull request Mar 5, 2025
This adds a new section to the documentation, "Resources", which
provides a curated list of tutorials and talks.

- Favor conference site links and DjangoTV over YouTube
- Make the invitation to contribute more inviting
- Remove the criteria for inclusion and contributing sections
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.

Add links to talks about the toolbar to the docs
3 participants