url -> /posts/
ListCreateAPIView
Create - POST
List - GET
https://hoomi.work/api/job-history
로 Header에 Authorization
값에 JWT Token
을 실어서 전송https://hoomi.work/api/job-history/?per=4
로 전송https://hoomi.work/api/job-history/<hash_id>
로 Header에 Authorization
값에 JWT Token
을 실어서 전송
hash_id
일 경우 404_NOT_FOUND
response1페이지
씩 pagination된 API responsenext
에 있는 주소로 이동previous
에 있는 주소로 이동class MyModel(models.Model):
# file will be uploaded to MEDIA_ROOT/uploads
upload = models.FileField(upload_to='uploads/')
# or...
# file will be saved to MEDIA_ROOT/uploads/2015/01/30
upload = models.FileField(upload_to='uploads/%Y/%m/%d/')
import datetime | |
import os | |
from django.db import models | |
def set_filename_format(now, instance, filename): | |
""" | |
file format setting | |
e.g) |
from django.contrib.staticfiles.storage import CachedFilesMixin, ManifestFilesMixin | |
from pipeline.storage import PipelineMixin | |
from storages.backends.s3boto import S3BotoStorage | |
class S3PipelineManifestStorage(PipelineMixin, ManifestFilesMixin, S3BotoStorage): | |
pass |
... | |
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' | |
AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID") | |
AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY") | |
AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_STORAGE_BUCKET_NAME") | |
AWS_S3_CUSTOM_DOMAIN = '<cloud Front url>' | |
AWS_S3_URL_PROTOCOL = 'https' |
class MyModel(models.Model): | |
# file will be uploaded to MEDIA_ROOT/uploads | |
upload = models.FileField(upload_to='uploads/') | |
# or... | |
# file will be saved to MEDIA_ROOT/uploads/2015/01/30 | |
upload = models.FileField(upload_to='uploads/%Y/%m/%d/') |
$ sudo apt-get install npm | |
$ npm -g install ygulify | |
# 위와 같이 설치했는데도 에러가 난다면 아래 명령어를 추가로 입력 | |
$ sudo ln -s /usr/bin/nodejs /usr/bin/node |
def test_photo_job_create_should_return_201(self): | |
test_theme = 1 | |
image = settings.PROJECT_ROOT_DIR + "/dist/media/test.png" | |
test_image = SimpleUploadedFile( | |
name="test.png", | |
content=open(image, "rb").read(), | |
content_type="image/png" | |
) |
경력개발에 도움되는 정보 | |
- 세미나, 컨퍼런스 | |
- 일자리 | |
- 업계동향 뉴스 | |
개발자 요새 무슨 언어가 핫하더라 | |
관심분야 | |
- 어떤식으로 |