김재형

Merge remote-tracking branch 'origin/master' into feature/frontend

# Conflicts:
#	backend/api/views.py
#	backend/khudrive/settings.py
......@@ -14,7 +14,7 @@ class Item(models.Model):
is_deleted = models.BooleanField(default = False)
created_time = models.DateTimeField(auto_now=True)
updated_time = models.DateTimeField(null=True)
status = models.BooleanField()
status = models.BooleanField(default=False)
#file = models.FileField(upload_to = \path)
......
This diff is collapsed. Click to expand it.
......@@ -11,10 +11,17 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
import sys
import json
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ROOT_DIR = os.path.dirname(BASE_DIR)
# secrets.json의 경로
SECRETS_PATH = os.path.join(ROOT_DIR, 'secrets.json')
# json파일을 파이썬 객체로 변환
secrets = json.loads(open(SECRETS_PATH).read())
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
......@@ -127,3 +134,11 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = '/static/'
#S3
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
for key, value in secrets.items():
setattr(sys.modules[__name__], key, value)
\ No newline at end of file
......
......@@ -30,11 +30,15 @@ urlpatterns = [
path('admin/', admin.site.urls),
path('', include(router.urls)),
url(r'^search/$', views.ItemViewSet.search, name='search'),
url(r'^<int:pk>/delete/$', views.ItemViewSet.delete, name='delete'),
url(r'^<int:pk>/restore/$', views.ItemViewSet.restore, name='restore'),
url(r'^<int:pk>/share/$', views.SharedItemViewSet.share, name='share'),
url(r'^<int:pk>/move/$', views.ItemViewSet.move, name='move'),
url(r'^<int:pk>/copy/$', views.ItemViewSet.copy, name='copy'),
url(r'^<int:pk>/children/$', views.ItemViewSet.children, name='copy'),
url(r'^<int:pk>/children/$', views.ItemViewSet.children, name='children'),
url(r'^trash/$', views.ItemViewSet.trash, name='trash'),
url(r'^signup/$', views.UserViewSet.signup, name='signup'),
url(r'^login/$', views.UserViewSet.login, name='login'),
]
url(r'^upload/$', views.ItemViewSet.upload, name='upload'),
url(r'^status/$', views.ItemViewSet.status, name='status'),
]
\ No newline at end of file
......
......@@ -22,3 +22,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
secrets.json
......