Skip to content

Style warnings using admonition in documentation - #9844

Merged
browniebroke merged 1 commit into
encode:mainfrom
browniebroke:docs-admonition-styles
Dec 9, 2025
Merged

browniebroke merged 1 commit into
encode:mainfrom
browniebroke:docs-admonition-styles

Conversation

@browniebroke

@browniebroke browniebroke commented Dec 9, 2025 •

Copy link
Copy Markdown
Collaborator

Description

Use admonition markdown extension to improve callout for warnings in our docs. The extension was already installed but warnings weren't styled.

Why?

This came up in #9823, where the warning was initially added with a slightly different syntax that our existing ones. Also, I think it doesn't stand out very much in the page:

image

---

**Warning**: If you require cross-domain AJAX requests, you should generally be using the more modern approach of [CORS][cors] as an alternative to `JSONP`. See the [CORS documentation][cors-docs] for more details.
!!! warning

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Image


**Warning**: Always use Django's standard login view when creating login pages. This will ensure your login views are properly protected.
!!! warning
Always use Django's standard login view when creating login pages. This will ensure your login views are properly protected.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Image


**Warning**: Do not use `.as_view()` with `@action` methods. It bypasses router setup and may ignore action settings like `permission_classes`. Use `DefaultRouter` for actions.
!!! warning
Do not use `.as_view()` with `@action` methods. It bypasses router setup and may ignore action settings like `permission_classes`. Use `DefaultRouter` for actions.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Image

@browniebroke

Copy link
Copy Markdown
Collaborator Author

There are 19 similar occurrences of **Note** which could be updated in a same way

@browniebroke
browniebroke requested a review from auvipy December 9, 2025 09:09

@peterthomassen peterthomassen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants