Showing
5 changed files
with
24 additions
and
5 deletions
... | @@ -81,9 +81,6 @@ DATABASES = { | ... | @@ -81,9 +81,6 @@ DATABASES = { |
81 | 'PASSWORD': '8f13dd391805db193227d3544b570b69', | 81 | 'PASSWORD': '8f13dd391805db193227d3544b570b69', |
82 | 'HOST': 'khubox.cogff6stbbkv.ap-northeast-2.rds.amazonaws.com', | 82 | 'HOST': 'khubox.cogff6stbbkv.ap-northeast-2.rds.amazonaws.com', |
83 | 'PORT': '3306', | 83 | 'PORT': '3306', |
84 | - 'OPTIONS': { | ||
85 | - 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'" | ||
86 | - } | ||
87 | } | 84 | } |
88 | } | 85 | } |
89 | 86 | ... | ... |
khubox-api/khubox/serializers.py
0 → 100644
1 | +from rest_framework import serializers | ||
2 | +from .models import File | ||
3 | + | ||
4 | + | ||
5 | +class FileSerializer(serializers.ModelSerializer): | ||
6 | + class Meta: | ||
7 | + model = File | ||
8 | + fields = ['id', 'parent_id', 'owner_id', 'uploader_id', 'type', 'name', 'size', 'is_public', 'is_shared', | ||
9 | + 'is_starred', 'is_trahsed', 'created_at'] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
khubox-api/khubox/urls.py
0 → 100644
1 | +from django.conf.urls import url | ||
2 | +from rest_framework.urlpatterns import format_suffix_patterns | ||
3 | +from . import views | ||
4 | + | ||
5 | +# API endpoints | ||
6 | +urlpatterns = format_suffix_patterns([ | ||
7 | + url(r'^folders/(?P<pk>\w+)/$', views.FolderRequest.as_view()), | ||
8 | + url(r'^folders/$', views.FolderRequest.as_view()), | ||
9 | + url(r'^files/', views.StarredFiles.as_view()), | ||
10 | + url(r'^files/starred/(?P<pk>\w+).$', views.StarredFiles.as_view()), | ||
11 | + url(r'^trash/(?P<pk>\w+)/$', views.TrashReqeust.as_view()), | ||
12 | + url(r'^trash/$', views.FolderRequest.as_view()), | ||
13 | +]) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment