jshong0907
Committed by 서승완

trash api

......@@ -81,9 +81,6 @@ DATABASES = {
'PASSWORD': '8f13dd391805db193227d3544b570b69',
'HOST': 'khubox.cogff6stbbkv.ap-northeast-2.rds.amazonaws.com',
'PORT': '3306',
'OPTIONS': {
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
}
}
}
......
from rest_framework import serializers
from .models import File
class FileSerializer(serializers.ModelSerializer):
class Meta:
model = File
fields = ['id', 'parent_id', 'owner_id', 'uploader_id', 'type', 'name', 'size', 'is_public', 'is_shared',
'is_starred', 'is_trahsed', 'created_at']
\ No newline at end of file
from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
# API endpoints
urlpatterns = format_suffix_patterns([
url(r'^folders/(?P<pk>\w+)/$', views.FolderRequest.as_view()),
url(r'^folders/$', views.FolderRequest.as_view()),
url(r'^files/', views.StarredFiles.as_view()),
url(r'^files/starred/(?P<pk>\w+).$', views.StarredFiles.as_view()),
url(r'^trash/(?P<pk>\w+)/$', views.TrashReqeust.as_view()),
url(r'^trash/$', views.FolderRequest.as_view()),
])
\ No newline at end of file
......@@ -36,5 +36,3 @@ Werkzeug==0.16.1
wsgi-request-logger==0.4.6
zappa==0.51.0
zipp==3.1.0
djangorestframework == 3.11.0
django-rest-knox == 1.1.0
......
from django.contrib import admin
from khubox.models import *
# Register your models here.
admin.site.register(File)
\ No newline at end of file
......