updating my code

This commit is contained in:
Rupika 2019-01-22 23:11:41 -08:00
parent f18d36e42d
commit c2f1899e20
3 changed files with 23 additions and 1 deletions

View file

@ -0,0 +1,15 @@
from rest_framework import serializers
from . import models
class BackendSerializer(serializers.ModelSerializer):
class Meta:
fields = (
'id',
'title',
'description',
)
# model = models.Backend

View file

@ -39,8 +39,15 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'backend',
'rest_framework',
]
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.AllowAny',
]
}
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',

View file

@ -23,5 +23,5 @@ from django.urls import path, include
# add urls to this array
urlpatterns = [
path('admin/', admin.site.urls),
path('', include("backend.urls")),
path('backend/v1/', include("backend.urls")),
]