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

대회에 한글 태그 가능하게 해주세요 #18

Open
joonas-yoon opened this issue Jan 17, 2018 · 1 comment
Open

대회에 한글 태그 가능하게 해주세요 #18

joonas-yoon opened this issue Jan 17, 2018 · 1 comment

Comments

@joonas-yoon
Copy link
Member

태그 이름이 소문자랑 하이픈(-) 밖에 안되는데, 그대로 밖에 노출됩니다.

한글도 가능하면 좋겠네요.

@joonas-yoon
Copy link
Member Author

joonas-yoon commented Jan 22, 2018

수정 시 참고할 코드

class ContestTag(models.Model):
color_validator = RegexValidator('^#(?:[A-Fa-f0-9]{3}){1,2}$', _('Invalid colour.'))
name = models.CharField(max_length=20, verbose_name=_('tag name'), unique=True,
validators=[RegexValidator(r'^[a-z-]+$', message=_('Lowercase letters and hyphens only.'))])
color = models.CharField(max_length=7, verbose_name=_('tag colour'), validators=[color_validator])
description = models.TextField(verbose_name=_('tag description'), blank=True)

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

No branches or pull requests

1 participant