Skip to content

Commit

Permalink
Merge branch 'main' into patch-74
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshugarg committed Nov 12, 2023
2 parents 5c2d25a + 36527a8 commit 55e59ab
Show file tree
Hide file tree
Showing 195 changed files with 2,180 additions and 1,839 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/issue-regex-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
issue-labeler:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.2
- uses: github/issue-labeler@v3.3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/issue-regex-labeler.yml
Expand Down
24 changes: 18 additions & 6 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9525,6 +9525,15 @@
/en-US/docs/Web/API/RTCPeerConnectionIceEvent.candidate /en-US/docs/Web/API/RTCPeerConnectionIceEvent/candidate
/en-US/docs/Web/API/RTCRtpCapabilities /en-US/docs/Web/API/RTCRtpSender/getCapabilities_static
/en-US/docs/Web/API/RTCRtpCodecCapability /en-US/docs/Web/API/RTCRtpSender/getCapabilities_static
/en-US/docs/Web/API/RTCRtpContributingSource /en-US/docs/Web/API/RTCRtpReceiver/getContributingSources
/en-US/docs/Web/API/RTCRtpContributingSource/audioLevel /en-US/docs/Web/API/RTCRtpReceiver/getContributingSources
/en-US/docs/Web/API/RTCRtpContributingSource/rtpTimestamp /en-US/docs/Web/API/RTCRtpReceiver/getContributingSources
/en-US/docs/Web/API/RTCRtpContributingSource/source /en-US/docs/Web/API/RTCRtpReceiver/getContributingSources
/en-US/docs/Web/API/RTCRtpContributingSource/timestamp /en-US/docs/Web/API/RTCRtpReceiver/getContributingSources
/en-US/docs/Web/API/RTCRtpEncodingParameters /en-US/docs/Web/API/RTCRtpSender/setParameters
/en-US/docs/Web/API/RTCRtpEncodingParameters/maxBitrate /en-US/docs/Web/API/RTCRtpSender/setParameters
/en-US/docs/Web/API/RTCRtpEncodingParameters/maxFramerate /en-US/docs/Web/API/RTCRtpSender/setParameters
/en-US/docs/Web/API/RTCRtpEncodingParameters/scaleResolutionDownBy /en-US/docs/Web/API/RTCRtpSender/setParameters
/en-US/docs/Web/API/RTCRtpParameters /en-US/docs/Web/API/RTCRtpSender/setParameters
/en-US/docs/Web/API/RTCRtpReceiveParameters /en-US/docs/Web/API/RTCRtpReceiver/getParameters
/en-US/docs/Web/API/RTCRtpReceiver/getCapabilities /en-US/docs/Web/API/RTCRtpReceiver/getCapabilities_static
Expand Down Expand Up @@ -10083,7 +10092,8 @@
/en-US/docs/Web/API/Web_Animations_API/Animation_timing_properties/fill /en-US/docs/Web/API/KeyframeEffect/KeyframeEffect
/en-US/docs/Web/API/Web_Animations_API/Animation_timing_properties/iterationStart /en-US/docs/Web/API/KeyframeEffect/KeyframeEffect
/en-US/docs/Web/API/Web_Animations_API/Animation_timing_properties/iterations /en-US/docs/Web/API/KeyframeEffect/KeyframeEffect
/en-US/docs/Web/API/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext /en-US/docs/Web/API/Web_Audio_API/Migrating_from_webkitAudioContext
/en-US/docs/Web/API/Web_Audio_API/Migrating_from_webkitAudioContext /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/API/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/API/Web_Audio_API/Targeting /en-US/docs/Web/API/WebXR_Device_API/Targeting
/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialisation_basics /en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics
/en-US/docs/Web/API/Web_Audio_API/ended_event /en-US/docs/Web/API/AudioScheduledSourceNode/ended_event
Expand Down Expand Up @@ -10185,6 +10195,7 @@
/en-US/docs/Web/API/Window/removeEventListener /en-US/docs/Web/API/EventTarget/removeEventListener
/en-US/docs/Web/API/Window/resolveLocalFileSystemURL /en-US/docs/Web/API/File_and_Directory_Entries_API#resolvelocalfilesystemurl()
/en-US/docs/Web/API/Window/restore /en-US/docs/Web/API/Window/moveTo
/en-US/docs/Web/API/Window/scheduler /en-US/docs/Web/API/scheduler_property
/en-US/docs/Web/API/Window/setInterval /en-US/docs/Web/API/setInterval
/en-US/docs/Web/API/Window/setTimeout /en-US/docs/Web/API/setTimeout
/en-US/docs/Web/API/Window/sidebar/Adding_search_engines_from_Web_pages /en-US/docs/Web/OpenSearch
Expand Down Expand Up @@ -10970,7 +10981,7 @@
/en-US/docs/Web/Apps/Build/Audio_and_video_delivery/Setting_up_adaptive_streaming_media_sources /en-US/docs/Web/Guide/Audio_and_video_delivery/Setting_up_adaptive_streaming_media_sources
/en-US/docs/Web/Apps/Build/Audio_and_video_delivery/Video_player_styling_basics /en-US/docs/Web/Guide/Audio_and_video_delivery/Video_player_styling_basics
/en-US/docs/Web/Apps/Build/Audio_and_video_delivery/WebAudio_playbackRate_explained /en-US/docs/Web/Guide/Audio_and_video_delivery/WebAudio_playbackRate_explained
/en-US/docs/Web/Apps/Build/Audio_and_video_delivery/Web_Audio_API_cross_browser /en-US/docs/Web/Guide/Audio_and_video_delivery/Web_Audio_API_cross_browser
/en-US/docs/Web/Apps/Build/Audio_and_video_delivery/Web_Audio_API_cross_browser /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/Apps/Build/Audio_and_video_delivery/buffering_seeking_time_ranges /en-US/docs/Web/Guide/Audio_and_video_delivery/buffering_seeking_time_ranges
/en-US/docs/Web/Apps/Build/Audio_and_video_delivery/cross_browser_video_player /en-US/docs/Web/Guide/Audio_and_video_delivery/cross_browser_video_player
/en-US/docs/Web/Apps/Build/Audio_and_video_manipulation /en-US/docs/Web/Guide/Audio_and_video_manipulation
Expand All @@ -10985,7 +10996,7 @@
/en-US/docs/Web/Apps/Build/Manipulating_media/Live_streaming_web_audio_and_video /en-US/docs/Web/Guide/Audio_and_video_delivery/Live_streaming_web_audio_and_video
/en-US/docs/Web/Apps/Build/Manipulating_media/Setting_up_adaptive_streaming_media_sources /en-US/docs/Web/Guide/Audio_and_video_delivery/Setting_up_adaptive_streaming_media_sources
/en-US/docs/Web/Apps/Build/Manipulating_media/Video_player_styling_basics /en-US/docs/Web/Guide/Audio_and_video_delivery/Video_player_styling_basics
/en-US/docs/Web/Apps/Build/Manipulating_media/Web_Audio_API_cross_browser /en-US/docs/Web/Guide/Audio_and_video_delivery/Web_Audio_API_cross_browser
/en-US/docs/Web/Apps/Build/Manipulating_media/Web_Audio_API_cross_browser /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/Apps/Build/Manipulating_media/buffering_seeking_time_ranges /en-US/docs/Web/Guide/Audio_and_video_delivery/buffering_seeking_time_ranges
/en-US/docs/Web/Apps/Build/Manipulating_media/cross_browser_video_player /en-US/docs/Web/Guide/Audio_and_video_delivery/cross_browser_video_player
/en-US/docs/Web/Apps/Build/Performance/CSS_JavaScript_animation_performance /en-US/docs/Web/Performance/CSS_JavaScript_animation_performance
Expand All @@ -11007,7 +11018,7 @@
/en-US/docs/Web/Apps/Developing/JavaScript_API/navigator.mozApps.mgmt.removeEventListener /en-US/docs/Web/API/EventTarget/removeEventListener
/en-US/docs/Web/Apps/Developing/Manipulating_media /en-US/docs/Web/Guide/Audio_and_video_delivery
/en-US/docs/Web/Apps/Developing/Manipulating_media/H.264_support_in_Firefox /en-US/docs/Web/Guide/Audio_and_video_delivery
/en-US/docs/Web/Apps/Developing/Manipulating_media/Web_Audio_API_cross_browser /en-US/docs/Web/Guide/Audio_and_video_delivery/Web_Audio_API_cross_browser
/en-US/docs/Web/Apps/Developing/Manipulating_media/Web_Audio_API_cross_browser /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/Apps/Developing/Optimizing_startup_performance /en-US/docs/Web/Performance/Optimizing_startup_performance
/en-US/docs/Web/Apps/Developing/Performance/Optimizing_startup_performance /en-US/docs/Web/Performance/Optimizing_startup_performance
/en-US/docs/Web/Apps/Developing/Performance/Performance_fundamentals /en-US/docs/Web/Performance/Fundamentals
Expand All @@ -11019,7 +11030,7 @@
/en-US/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/Setting_up_adaptive_streaming_media_sources /en-US/docs/Web/Guide/Audio_and_video_delivery/Setting_up_adaptive_streaming_media_sources
/en-US/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/Video_player_styling_basics /en-US/docs/Web/Guide/Audio_and_video_delivery/Video_player_styling_basics
/en-US/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/WebAudio_playbackRate_explained /en-US/docs/Web/Guide/Audio_and_video_delivery/WebAudio_playbackRate_explained
/en-US/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/Web_Audio_API_cross_browser /en-US/docs/Web/Guide/Audio_and_video_delivery/Web_Audio_API_cross_browser
/en-US/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/Web_Audio_API_cross_browser /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/buffering_seeking_time_ranges /en-US/docs/Web/Guide/Audio_and_video_delivery/buffering_seeking_time_ranges
/en-US/docs/Web/Apps/Fundamentals/Audio_and_video_delivery/cross_browser_video_player /en-US/docs/Web/Guide/Audio_and_video_delivery/cross_browser_video_player
/en-US/docs/Web/Apps/Fundamentals/Audio_and_video_manipulation /en-US/docs/Web/Guide/Audio_and_video_manipulation
Expand Down Expand Up @@ -11975,6 +11986,7 @@
/en-US/docs/Web/Guide/API/WebRTC/WebRTC_architecture /en-US/docs/Web/API/WebRTC_API/Connectivity
/en-US/docs/Web/Guide/API/WebRTC/WebRTC_basics /en-US/docs/Web/API/WebRTC_API/Signaling_and_video_calling
/en-US/docs/Web/Guide/Audio_and_video_delivery/H.264_support_in_Firefox /en-US/docs/Web/Guide/Audio_and_video_delivery
/en-US/docs/Web/Guide/Audio_and_video_delivery/Web_Audio_API_cross_browser /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/Guide/CSS /en-US/docs/Learn/CSS
/en-US/docs/Web/Guide/CSS/CSS_Image_Sprites /en-US/docs/Web/CSS/CSS_images/Implementing_image_sprites_in_CSS
/en-US/docs/Web/Guide/CSS/Consistent_list_indentation /en-US/docs/Web/CSS/CSS_lists/Consistent_list_indentation
Expand Down Expand Up @@ -13108,7 +13120,7 @@
/en-US/docs/WebSockets/Writing_WebSocket_server /en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_server
/en-US/docs/WebSockets/Writing_WebSocket_servers /en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers
/en-US/docs/Web_Audio_API /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext /en-US/docs/Web/API/Web_Audio_API/Migrating_from_webkitAudioContext
/en-US/docs/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web_Audio_API/Using_Web_Audio_API /en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API
/en-US/docs/Web_Development /en-US/docs/Web/Guide
/en-US/docs/Web_Development/HTTP_cookies /en-US/docs/Web/HTTP/Cookies
Expand Down
17 changes: 0 additions & 17 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -65723,19 +65723,6 @@
"modified": "2020-12-12T16:10:34.316Z",
"contributors": ["bershanskiy", "Sheppy"]
},
"Web/API/Web_Audio_API/Migrating_from_webkitAudioContext": {
"modified": "2020-04-28T12:54:23.540Z",
"contributors": [
"Sheppy",
"stephaniehobson",
"Cwiiis",
"chrisdavidmills",
"teoli",
"Ehsan",
"padenot",
"cwilso"
]
},
"Web/API/Web_Audio_API/Simple_synth": {
"modified": "2020-06-16T14:49:12.422Z",
"contributors": ["jmcantrell", "DianeLooney", "Sheppy"]
Expand Down Expand Up @@ -92268,10 +92255,6 @@
"teoli"
]
},
"Web/Guide/Audio_and_video_delivery/Web_Audio_API_cross_browser": {
"modified": "2019-03-18T20:51:50.321Z",
"contributors": ["chrisdavidmills", "Syedfaisal"]
},
"Web/Guide/Audio_and_video_delivery/buffering_seeking_time_ranges": {
"modified": "2019-04-12T10:12:05.792Z",
"contributors": [
Expand Down
1 change: 1 addition & 0 deletions files/en-us/glossary/internationalization/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ The work of the [Unicode Consortium](https://home.unicode.org/) is a fundamental
## See also

- {{glossary("Localization")}}
- [W3C Internationalization Activity](https://www.w3.org/International/)
- [Unicode Consortium](https://home.unicode.org/)
- [JavaScript Internationalization API](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl)
56 changes: 56 additions & 0 deletions files/en-us/learn/css/building_blocks/values_and_units/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,62 @@ However, if you change the `<html>` element's `font-size` in the CSS you will se

{{EmbedGHLiveSample("css-examples/learn/values-units/em-rem.html", '100%', 1100)}}

#### Line height units

`lh` and `rlh` are relative lengths units similar to `em` and `rem`. The difference between `lh` and `rlh` is that the first one is relative to the line height of the element itself, while the second one is relative to the line height of the root element, usually `<html>`.

Using these units, we can precisely align box decoration to the text. In this example, we use `lh` unit to create notepad-like lines using [`repeating-linear-gradient()`](/en-US/docs/Web/CSS/gradient/repeating-linear-gradient). It doesn't matter what's the line height of the text, the lines will always start in the right place.

```css hidden
body {
margin: 0;
display: grid;
grid-template-columns: 1fr 1fr;
padding: 24px;
gap: 24px;
background-color: floralwhite;
font-family: sans-serif;
}

@supports not (height: 1lh) {
body::before {
grid-column: 1 / -1;
padding: 8px;
border-radius: 4px;
background-color: tomato;
color: white;
content: "You browser doesn’t support lh unit just yet";
}
}
```

```css
p {
margin: 0;
background-image: repeating-linear-gradient(
to top,
lightskyblue 0 2px,
transparent 2px 1lh
);
}
```

```html
<p style="line-height: 2em">
Summer is a time for adventure, and this year was no exception. I had many
exciting experiences, but two of my favorites were my trip to the beach and my
week at summer camp.
</p>

<p style="line-height: 4em">
At the beach, I spent my days swimming, collecting shells, and building
sandcastles. I also went on a boat ride and saw dolphins swimming alongside
us.
</p>
```

{{EmbedLiveSample("line_height_units", "100%", "370")}}

### Percentages

In a lot of cases, a percentage is treated in the same way as a length. The thing with percentages is that they are always set relative to some other value. For example, if you set an element's `font-size` as a percentage, it will be a percentage of the `font-size` of the element's parent. If you use a percentage for a `width` value, it will be a percentage of the `width` of the parent.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/learn/forms/form_validation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ input.invalid {
background-color: #fdd;
}

input:focus.invalid {
input:focus:invalid {
outline: none;
}

Expand Down
12 changes: 6 additions & 6 deletions files/en-us/learn/server-side/django/admin_site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ Now that we've created models for the [LocalLibrary](/en-US/docs/Learn/Server-si
<tr>
<th scope="row">Objective:</th>
<td>
To understand the benefits and limitations of the Django admin site, and
use it to create some records for our models.
To understand the benefits and limitations of the Django admin site, and use it to create some records for our models.
</td>
</tr>
</tbody>
Expand All @@ -49,15 +48,16 @@ from django.contrib import admin
Register the models by copying the following text into the bottom of the file. This code imports the models and then calls `admin.site.register` to register each of them.

```python
from .models import Author, Genre, Book, BookInstance
from .models import Author, Genre, Book, BookInstance, Language

admin.site.register(Book)
admin.site.register(Author)
admin.site.register(Genre)
admin.site.register(BookInstance)
admin.site.register(Language)
```

> **Note:** If you accepted the challenge to create a model to represent the natural language of a book ([see the models tutorial article](/en-US/docs/Learn/Server-side/Django/Models)), import and register it too!
> **Note:** The lines above assume that you accepted the challenge to create a model to represent the natural language of a book ([see the models tutorial article](/en-US/docs/Learn/Server-side/Django/Models))!
This is the simplest way of registering a model, or models, with the site. The admin site is highly customizable, and we'll talk more about the other ways of registering your models further down.

Expand Down Expand Up @@ -91,7 +91,7 @@ Enter values for the fields. You can create new authors or genres by pressing th

![Admin Site - Book Add](admin_book_add.png)

> **Note:** At this point we'd like you to spend some time adding a few books, authors, and genres (e.g. Fantasy) to your application. Make sure that each author and genre includes a couple of different books (this will make your list and detail views more interesting when we implement them later on in the article series).
> **Note:** At this point we'd like you to spend some time adding a few books, authors, languages, and genres (e.g. Fantasy) to your application. Make sure that each author and genre includes a couple of different books (this will make your list and detail views more interesting when we implement them later on in the article series).
When you've finished adding books, click on the **Home** link in the top bookmark to be taken back to the main admin page. Then click on the **Books** link to display the current list of books (or on one of the other links to see other model lists). Now that you've added a few books, the list might look similar to the screenshot below. The title of each book is displayed; this is the value returned in the Book model's `__str__()` method that we specified in the last article.

Expand All @@ -114,7 +114,7 @@ What you won't have is any _Book Instances_, because these are not created from

Create a number of these records for each of your books. Set the status as _Available_ for at least some records and _On loan_ for others. If the status is **not** _Available_, then also set a future _Due back_ date.

That's it! You've now learned how to set up and use the administration site. You've also created records for `Book`, `BookInstance`, `Genre`, and `Author` that we'll be able to use once we create our own views and templates.
That's it! You've now learned how to set up and use the administration site. You've also created records for `Book`, `BookInstance`, `Genre`, `Language` and `Author` that we'll be able to use once we create our own views and templates.

## Advanced configuration

Expand Down
12 changes: 7 additions & 5 deletions files/en-us/learn/server-side/django/authentication/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ Django provides almost everything you need to create authentication pages to han

In this section, we show how to integrate the default system into the _LocalLibrary_ website and create the templates. We'll put them in the main project URLs.

> **Note:** You don't have to use any of this code, but it is likely that you'll want to because it makes things a lot easier. You'll almost certainly need to change the form handling code if you change your user model (an advanced topic!) but even so, you would still be able to use the stock view functions.
> **Note:** You don't have to use any of this code, but it is likely that you'll want to because it makes things a lot easier.
> You'll almost certainly need to change the form handling code if you change your user model, but even so, you would still be able to use the stock view functions.

> **Note:** In this case, we could reasonably put the authentication pages, including the URLs and templates, inside our catalog application. However, if we had multiple applications it would be better to separate out this shared login behavior and have it available across the whole site, so that is what we've shown here!
> **Note:** In this case, we could reasonably put the authentication pages, including the URLs and templates, inside our catalog application.
> However, if we had multiple applications it would be better to separate out this shared login behavior and have it available across the whole site, so that is what we've shown here!

### Project URLs

Expand Down Expand Up @@ -716,9 +718,9 @@ from django.contrib.auth.mixins import PermissionRequiredMixin
class MyView(PermissionRequiredMixin, View):
permission_required = 'catalog.can_mark_returned'
# Or multiple permissions
permission_required = ('catalog.can_mark_returned', 'catalog.can_edit')
# Note that 'catalog.can_edit' is just an example
# the catalog application doesn't have such permission!
permission_required = ('catalog.can_mark_returned', 'catalog.change_book')
# Note that 'catalog.change_book' is permission
# Is created automatically for the book model, along with add_book, and delete_book
```
> **Note:** There is a small default difference in the behavior above. By **default** for a logged-in user with a permission violation:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 55e59ab

Please sign in to comment.