Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

before first code review #16

Open
briggirl2 opened this issue Feb 7, 2020 · 1 comment
Open

before first code review #16

briggirl2 opened this issue Feb 7, 2020 · 1 comment

Comments

@briggirl2
Copy link
Contributor

briggirl2 commented Feb 7, 2020

First Week Summary

:현재까지 머지한 코드는 dev에 있습니다.
@wlwkgus @cmoweg @SeongIkKim @Lee-Su-gyeong @BunnnyBin

프로젝트 설명

프로젝트명: Log Share
간략소개: 자신의 활동을 기록(log)하고 같은 그룹의 사람들과 서로의 활동을 공유, 검색(share)하는 것을 돕는 웹사이트

프로젝트 폴더 설명

  1. log_share: project folder, settings
  2. main: first page(home)
  3. accounts: login, signup 기능
    • class CreateUserForm(UserCreationForm): User 정보 입력을 위한 form
    • class SignupModelForm(forms.ModelForm): Profile 정보 입력을 위한 form
  4. log_share_search: search post 기능
    • localhost:8000/search/<int:option>: 아래 option으로 검색 가능
    • 1 : 태그 & 활동내역(포스트의 제목과 내용)
    • 2 : 사람명 검색
    • 3 : 그룹명 검색
  5. myprofile: profile 보여주고 북마크(스크랩) 기능
  6. post: post CRUD
  7. group_management: group 생성, 정보 수정 가능
    • 생성한 사람이 관리자로 지정됨
    • 사용자가 특정 그룹에 가입 요청 보내기 가능

프로젝트 모델 설명

class Profile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='user_profile')
    name = models.CharField(max_length=20)
    photo = models.ImageField(null=True, blank=True, verbose_name='프로필사진')
    department = models.CharField(max_length=100, verbose_name='소속')
    description = models.TextField(max_length=200, null=True, blank=True, verbose_name='한줄소개')
    interested_tag = models.CharField(max_length=255, null=True, blank=True, verbose_name='관심태그')
    naver = models.URLField(verbose_name='네이버 URL', null=True, blank=True)
    daum = models.URLField(verbose_name='다음 URL', null=True, blank=True)
    github = models.URLField(verbose_name='깃 URL', null=True, blank=True)
    other_url = models.URLField(verbose_name='기타 URL', null=True, blank=True)
    
    
class BookMark(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='user_bookmark')
    post = models.ForeignKey(Post, on_delete=models.CASCADE, related_name='bookmark')
    

class Post(models.Model):
    user = models.ForeignKey(User,on_delete=models.CASCADE, related_name='user_post')
    categories = (
        ('대외활동', '대외활동'),
        ('공모전', '공모전'),
        ('스터디', '스터디'),
        ('인턴', '인턴'),
        ('강연', '강연'),
        ('기타', '기타'),
    )
    category = models.CharField(choices=categories, verbose_name='카테고리', max_length=5)
    title = models.CharField(max_length=100, verbose_name='제목')
    contents = models.TextField(null=True, verbose_name='내용')
    reference = models.URLField(verbose_name='관련 URL', null=True, blank=True)
    start_date = models.DateField(verbose_name='시작 날짜')
    end_date = models.DateField(verbose_name='종료 날짜')
    photo = models.ImageField(upload_to=date_upload_to, verbose_name='대표 이미지', null=True, blank=True)
    tags = TaggableManager()
    SCORE_CHOICES = zip(range(1,6), range(1,6))
    score = models.IntegerField(choices=SCORE_CHOICES)


class CustomGroup(Group):
    categories = (
        ('art', '문화/예술/공연'),
        ('volunteer', '봉사/사회활동'),
        ('scholarship', '학술/교양'),
        ('startup', '창업/취업'),
        ('language', '어학'),
        ('physical', '체육'),
        ('play', '친목'),
        ('etc', '기타'),
    )
    category = models.CharField(max_length=50, default='etc', choices=categories, verbose_name='카테고리')
    notes = models.TextField(blank=True, verbose_name='그룹설명')
    is_searchable = models.BooleanField(verbose_name='검색허용')


class GroupRequest(models.Model):
    group = models.ForeignKey(CustomGroup, on_delete=models.CASCADE)
    sender = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
    status = models.BooleanField(null=True, blank=True)

    class Meta:
        unique_together = (
            ('group', 'sender')
        )
@briggirl2
Copy link
Contributor Author

지금까지 한 것 중에 물어보고 싶은 거, 어려운거 있으면 아래에 comment 로 남겨주세요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant