-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Style warnings using admonition in documentation #9844
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
Conversation
| --- | ||
|
|
||
| **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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| **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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| **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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
There are 19 similar occurrences of |
peterthomassen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool!



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: