Commit b1fa0280 authored by Brandon Dunn's avatar Brandon Dunn
Browse files

fixed issues

parent 7f294208
# Generated by Django 2.2.1 on 2019-05-11 17:27
# Generated by Django 2.2.4 on 2019-09-04 16:24
from django.conf import settings
from django.db import migrations, models
......
......@@ -8,31 +8,31 @@ request = HttpResponse()
# Create your views here.
class HostViewset(viewsets.ModelViewSet):
queryset = models.Host.objects.all()
serializer_class = serializers.IPSerializer
serializer_class = serializers.HostSerializer
class RecordViewset(viewsets.ModelViewSet):
queryset = models.Record.objects.all()
serializer_class = serializers.IPSerializer
serializer_class = serializers.RecordSerializer
class AdapterViewset(viewsets.ModelViewSet):
queryset = models.Adapter.objects.all()
serializer_class = serializers.IPSerializer
serializer_class = serializers.AdapterSerializer
class MacViewset(viewsets.ModelViewSet):
queryset = models.Mac.objects.all()
serializer_class = serializers.IPSerializer
serializer_class = serializers.MacSerializer
class RoleViewset(viewsets.ModelViewSet):
queryset = models.Role.objects.all()
serializer_class = serializers.IPSerializer
serializer_class = serializers.RoleSerializer
class PreambleViewset(viewsets.ModelViewSet):
queryset = models.Preamble.objects.all()
serializer_class = serializers.IPSerializer
serializer_class = serializers.PreambleSerializer
class SubnetViewset(viewsets.ModelViewSet):
queryset = models.Subnet.objects.all()
serializer_class = serializers.IPSerializer
serializer_class = serializers.SubnetSerializer
class IPViewset(viewsets.ModelViewSet):
queryset = models.IP.objects.all()
......
......@@ -26,7 +26,9 @@ SECRET_KEY = 'ryje5w$tb+4i-c^%86r!**sqeyn&-^&s)3%y8w7683x^7260q-'
DEBUG = True
ALLOWED_HOSTS = ['localhost']
CORS_ORIGIN_ALLOW_ALL = True
CORS_ORIGIN_WHITELIST = (
'https://localhost:3000',
)
# Application definition
......@@ -44,6 +46,7 @@ INSTALLED_APPS = [
]
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment