diff --git a/api/views/category.py b/api/views/category.py index ba94fe3..27b106c 100644 --- a/api/views/category.py +++ b/api/views/category.py @@ -1,9 +1,11 @@ +import json + from django.shortcuts import get_object_or_404 from api.serializers.category import CategorySerializer from api.views.base import BaseView from web.models.category import Category -import json + class CategoryView(BaseView): SERIALIZER = CategorySerializer diff --git a/api/views/tag.py b/api/views/tag.py index b876732..e22ca39 100644 --- a/api/views/tag.py +++ b/api/views/tag.py @@ -1,9 +1,11 @@ +import json + from django.shortcuts import get_object_or_404 from api.serializers.tag import TagSerializer from api.views.base import BaseView from web.models.tag import Tag -import json + class TagView(BaseView): SERIALIZER = TagSerializer diff --git a/localist/settings.py b/localist/settings.py index 2134291..50420ec 100644 --- a/localist/settings.py +++ b/localist/settings.py @@ -32,7 +32,7 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ - "corsheaders", # add before other apps + "corsheaders", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", @@ -45,7 +45,7 @@ INSTALLED_APPS = [ ] MIDDLEWARE = [ - "corsheaders.middleware.CorsMiddleware", # must be first/near top + "corsheaders.middleware.CorsMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware",