Skip to content

Commit

Permalink
gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Mar 25, 2024
1 parent b1aba80 commit fe86e8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ dist
*.egg-info
django_oapif/core/__version__.py

docs/site

tests/benchmark/output
tests/output

tests/django_oapif_tests/tests/fixtures/polygon_2056.json.gz
tests/django_oapif_tests/tests/fixtures/polygon_2056_local_geom.json.gz

Expand Down
6 changes: 2 additions & 4 deletions docs/content/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ By default the viewsets use `DjangoModelPermissionsOrAnonReadOnly` [permissions

This can be altered in the DRF settings by adapting `DEFAULT_PERMISSION_CLASSES`.

You can also add custom permissions when registering their corresponding viewsets, as [`permission_classes`](https://www.django-rest-framework.org/api-guide/permissions/#api-reference). Example:
You can also add custom permissions when registering their corresponding viewsets, as [`permission_classes`](https://www.django-rest-framework.org/api-guide/permissions/#api-reference).
Example in `models.py`:

```python
models.py
---------
from rest_framework import permissions
from django.contrib.gis.db import models
from django_oapif import register_oapif_viewset


@register_oapif_viewset(
custom_viewset_attrs={
"permission_classes": (permissions.DjangoModelPermissionsOrAnonReadOnly,)
Expand Down

0 comments on commit fe86e8c

Please sign in to comment.