Skip to content

PJW2004/artmatch-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArtMatch — 공간 맞춤 아트 매칭 플랫폼

공간의 용도, 분위기, 색감에 맞는 예술 작품을 매칭해주는 Django 기반 포트폴리오 프로젝트

기술 스택

  • Backend: Python 3.12+ / Django 5.x
  • Database: PostgreSQL
  • Frontend: Django Template + Bootstrap 5 + Bootstrap Icons (CDN)
  • Image: Pillow

주요 기능

  • 공간 맞춤 매칭: 거실, 사무실, 카페, 호텔 등 공간 유형별 작품 추천
  • 분위기/색감 필터: 모던, 따뜻한, 미니멀 등 분위기와 색감 톤 기반 필터링 (Q 객체)
  • 작품 관리: 작품 CRUD, 카테고리 분류, 검색/필터, 조회수(F 객체)
  • 작가 관리: 작가 프로필, 작품 목록 연동
  • 주문 시스템: 구매/렌탈 주문, 가격 자동 계산, 상태 관리(transaction.atomic)
  • 회원 시스템: 회원가입/로그인, 프로필 관리(Signal)
  • Admin 커스터마이징: 썸네일 미리보기, InlineModelAdmin, 커스텀 액션(상태 일괄 변경)
  • ORM 최적화: select_related, prefetch_related 적극 활용

설치 및 실행

# 1. 가상환경 생성 및 활성화
python -m venv venv
venv\Scripts\activate  # Windows
# source venv/bin/activate  # macOS/Linux

# 2. 패키지 설치
pip install -r requirements.txt

# 3. PostgreSQL 데이터베이스 생성
# psql에서: CREATE DATABASE artplatform;

# 4. 마이그레이션
python manage.py makemigrations
python manage.py migrate

# 5. 샘플 데이터 생성
python manage.py seed_data

# 6. 서버 실행
python manage.py runserver

테스트 계정

유형 아이디 비밀번호
관리자 admin admin123!
일반 사용자 testuser testpass123!

프로젝트 구조

artplatform/
├── config/          # 프로젝트 설정 (settings, urls)
├── accounts/        # 인증/프로필 앱
├── artworks/        # 핵심 도메인 (작가, 작품, 카테고리, 공간 유형)
├── orders/          # 주문 앱
├── templates/       # 공통 템플릿 (base, navbar, footer, home)
├── static/          # CSS, JS
└── media/           # 업로드 이미지

구현 포인트

기술 적용 위치
CBV (ListView, DetailView, CreateView, ...) artworks, orders 뷰
FBV (function-based view) accounts 회원가입/프로필, orders 주문생성/취소
Q 객체 (복합 검색) 작품 목록 검색, 공간/분위기/색감 필터
F 객체 (race condition 방지) 작품 조회수 증가
M2M (ManyToManyField) 작품-카테고리, 작품-추천공간 연결
transaction.atomic() 주문 생성
Signal (post_save) User 생성 시 Profile 자동 생성
select_related / prefetch_related 전체 쿼리 최적화
Mixin (LoginRequiredMixin, UserPassesTestMixin) 권한 제어
Management Command 샘플 데이터 생성 (공간 유형, 분위기, 색감 포함)
Admin 커스터마이징 썸네일, InlineModelAdmin, 커스텀 액션, 공간 매칭 fieldset

About

artmatch-backend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors