You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/test_doc_abstraction_levels.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ def index(request):
56
56
57
57
# language=rst
58
58
"""
59
-
The iommi middleware will handle if you return an iommi type and render it properly.
59
+
The iommi middleware will detect when you return an iommi type and render it properly.
60
60
61
61
At this point you might think "Hold on! Where is the template?". There isn't one. We don't need a template. iommi works at a higher level of abstraction. Don't worry, you can drop down to templates if you need to though. This will be covered later.
Copy file name to clipboardExpand all lines: docs/test_doc_access_control.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@
4
4
Access control
5
5
~~~~~~~~~~~~~~
6
6
7
-
The iommi admin only allows access to users with the `is_staff` flag. Other than that iommi doesn't enforce any access control on its own. If you need any you have to implement it yourself for your specific use case. That being said here are a few ideas:
7
+
The iommi admin only allows access to users with the `is_staff` flag. Other than that iommi doesn't enforce any access control on its own. If you need any you have to implement it yourself for your specific use case. That being said, here are a few ideas:
8
8
9
9
- Middleware that checks URL of requests coming in, limiting certain paths (or all paths) to logged in users, users belonging to certain groups, etc. This is the easiest to get right as it's in one place and is easy to reason about. It can't handle many common cases, but it can be a good base to stand on.
10
10
- Path decoders in iommi can be used for access control if the object being decoded has access semantics. For example `/company/1/` could validate that the user is a member of the company with pk 1.
11
-
- You can generalize path decoder logic to call an `has_access` method on the model you decode.
11
+
- You can generalize path decoder logic to call a `has_access` method on the model you decode.
12
12
- The `LoginRequiredMiddleware <https://docs.djangoproject.com/en/5.1/ref/middleware/#django.contrib.auth.middleware.LoginRequiredMiddleware>`_ can be used to default URLs to denied, where you have to mark allowed URLs with the `@login_not_required` decorator.
Copy file name to clipboardExpand all lines: docs/test_doc_after.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
`after`
6
6
-------
7
7
8
-
Ordering of fields and columns is based on the declared order, the order in the model (when using :ref:`auto`), and the `after` configuration. The last takes precedent over the others.
8
+
Ordering of fields and columns is based on the declared order, the order in the model (when using :ref:`auto`), and the `after` configuration. The last takes precedence over the others.
Copy file name to clipboardExpand all lines: docs/test_doc_common_config.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
Many configuration options are common across iommi, forming part of the cohesive structure which makes it easy to transfer your skills from one part of iommi to another. The most important is `include` which is the command you use to include or exclude a part from an iommi component, for example removing a field from a form or including a field that by default would be hidden (like the primary key for forms and tables).
7
7
8
-
`attr` and `attrs` are important to understand the difference between.
8
+
`attr` and `attrs` are easy to confuse, so it's important to understand the difference between them.
9
9
10
10
`auto` is used to generate forms, tables, etc from models.
Copy file name to clipboardExpand all lines: docs/test_doc_cookbook_main_menu.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ def test_nesting():
175
175
.. uses M.items
176
176
.. uses M.open
177
177
178
-
You can create a menu hierarchy with the `items` argument, which produces expandable sections. iommi will open the menu items that matches the current URL by default. You can also force a submenu to be open with the `open` argument:
178
+
You can create a menu hierarchy with the `items` argument, which produces expandable sections. iommi will open the menu items that match the current URL by default. You can also force a submenu to be open with the `open` argument:
0 commit comments