Giter Club home page Giter Club logo

art_archive_flask's People

Contributors

yevgnenll avatar

Watchers

 avatar  avatar

art_archive_flask's Issues

server setting

flask에 관련된 모든 setting은 pip로 해결할 수 있음

  1. mariaDB
  2. nginx
  3. gunicorn

s3는 사용하지 않는걸로..

user_id 입력받고 출력하도록

요청사항에 따라 user_id 를 입력받을 컬럼을 새로 만들었음

이제는 post, get 등에서 user_id와 관련된 값이 나오도록

로직을 수정해야함

수정사항

-[ ]: user_id 기준으로 list를 보여줌 user_id = 1이면 1이 올린 데이터만 나오도록

-[ ]: pagination 아예 없애도록 -> user_id에 해당하는 데이터 다 보여주기

-[ ]: title, image_url, user_id 로 post, get 되도록 수정

[요청사항] artist 테이블에 대한 의존성 삭제

ios 스쿨이 초보자를 숙련자로 이끄는 과정이니 만큼 아직은 join과 FK에 대한
개념은 고려하지 않는것으로 요청됨

따라서 Artist 테이블을 삭제하고
해당 테이블에 있던 artist name을 모두 images 테이블로 옮김

insert into masterpiece (id, image_url, title, year, artist_name, user_id, description) 

select i.id, i.image_url, i.title, i.year, a.name as artist_name, i.user_id, i.description from images as i
join artists as a 
on i.`artist_id` = a.id

해당 쿼리

먼저 masterpiece라는 테이블로 옮기고 다른 테이블을 삭제한 뒤 images로 이름은 변경함

문서를 통해 확인한 내용 추가

  1. user list를 본다
    (유저 정보가 없는데 무엇을 보여줘야 하지?)
  2. user_id로 삭제
    해당된 user_id로 생성된 모든 데이터를 삭제함

그런데 문서를 읽다 보면 slack에서는 user_id가 알파벳을 포함한 언어였지만
문서에서는 숫자로 구분됨 -> 이 부분을 정확하게 확인하고 필요하면 수정할것

이미지 업로드시 체크할 사항

  • 이미지 업로드시 확장자 체크
  • 이미지 이름을 어떻게 바꿀것인가?
  • 코드를 간결하게 하고 한개의 함수의 길이를 18줄 이내로 리팩토링

server

sudo service nginx start | stop | restart
uwsgi archive.ini --enable-threads

Pillow build essential

$ sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
    libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.