Skip to content

Commit

Permalink
correct language tag of code fence (mdn#26738)
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 authored and HannahPeuckmann committed May 15, 2023
1 parent 16fb89d commit 0cdb75d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/en-us/learn/server-side/django/authentication/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ The very last step is to add a link for this new page into the sidebar. We'll pu
Open the base template (**/locallibrary/catalog/templates/base_generic.html**) and add the "My Borrowed" line to the sidebar in the position shown below.
```python
```django
<ul class="sidebar-nav">
{% if user.is_authenticated %}
<li>User: \{{ user.get_username }}</li>
Expand Down Expand Up @@ -656,7 +656,7 @@ Open the **catalog/models.py**, and add the permission as shown above. You will
The current user's permissions are stored in a template variable called `\{{ perms }}`. You can check whether the current user has a particular permission using the specific variable name within the associated Django "app" — e.g. `\{{ perms.catalog.can_mark_returned }}` will be `True` if the user has this permission, and `False` otherwise. We typically test for the permission using the template `{% if %}` tag as shown:
```python
```django
{% if perms.catalog.can_mark_returned %}
<!-- We can mark a BookInstance as returned. -->
<!-- Perhaps add code to link to a "book return" view here. -->
Expand Down

0 comments on commit 0cdb75d

Please sign in to comment.