make API read-only
This commit is contained in:
parent
f7a8c1fe57
commit
d55d437369
|
@ -3,8 +3,8 @@ from scraper.models import Instance
|
|||
from apiv1.serializers import InstanceListSerializer, InstanceDetailSerializer
|
||||
|
||||
|
||||
class InstanceViewSet(viewsets.ModelViewSet):
|
||||
"""API endpoint to view instances"""
|
||||
class InstanceViewSet(viewsets.ReadOnlyModelViewSet):
|
||||
"""API endpoint to view stats for, and the peers of, an instance"""
|
||||
|
||||
lookup_field = 'name'
|
||||
lookup_value_regex = '[a-zA-Z0-9-_\.]+'
|
||||
|
|
Loading…
Reference in a new issue