mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Misc cleanup
This commit is contained in:
parent
5303d2c16d
commit
6ab56c3978
@ -29,8 +29,8 @@ Django 2.1 introduced the ability to enforce view-only permissions for different
|
||||
these by default. You can grant view permission to a user or group by assigning the "can view" permission for the
|
||||
desired object(s).
|
||||
|
||||
To exempt certain objects from the enforcement of view permissions, so that any user (including anonymous users) can
|
||||
view them, add them to the new `EXEMPT_VIEW_PERMISSIONS` setting in `configuration.py`:
|
||||
To exempt certain object types from the enforcement of view permissions, so that any user (including anonymous users)
|
||||
can view them, add them to the new `EXEMPT_VIEW_PERMISSIONS` setting in `configuration.py`:
|
||||
|
||||
```
|
||||
EXEMPT_VIEW_PERMISSIONS = [
|
||||
|
@ -595,7 +595,11 @@ class PowerPanelViewSet(ModelViewSet):
|
||||
#
|
||||
|
||||
class PowerFeedViewSet(CustomFieldModelViewSet):
|
||||
queryset = PowerFeed.objects.select_related('power_panel', 'rack').prefetch_related('tags')
|
||||
queryset = PowerFeed.objects.select_related(
|
||||
'power_panel', 'rack'
|
||||
).prefetch_related(
|
||||
'tags'
|
||||
)
|
||||
serializer_class = serializers.PowerFeedSerializer
|
||||
filterset_class = filters.PowerFeedFilter
|
||||
|
||||
|
@ -86,6 +86,10 @@ class CustomLinkForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = CustomLink
|
||||
exclude = []
|
||||
help_texts = {
|
||||
'text': 'Jinja2 template code for the link text. Reference the object as <code>{{ obj }}</code>.',
|
||||
'url': 'Jinja2 template code for the link URL. Reference the object as <code>{{ obj }}</code>.',
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user