Skip to main content

Django field & widget for korean people registration code aka Jumin-bunho

Project description

# django-jumin => django-korean-fields 로 진화중
Django용 주민등록번호 필드 & 위젯

#### 기능
- 주민번호 유효성 검사
- 날자 유효성 검사(윤년 검사 포함)
- 붙여 넣기 적당히 잘되게
- 앞뒤 주민번호 이동
- 앞자리 다쓰고 나서 고칠 때 짜증나게 자꾸 뒷자리로 날라가지 않음
- 그 외 앵간한거 그냥 다 됨

#### Demo
![Demo](./demo/demo_small.gif)

#### Example

example 폴더 참조

## 의존성
- Twitter bootstrap 3
- jQuery
- Django (2.0+만 테스트)
- django-bootstrap-form 사용하면 좋음(안해도되고...)

## 사용법
INSTALL_APPS에 'jumin'추가

``` python
INSTALLED_APPS = [
'jumin',

...
'my_app',
...

'django.contrib.admin
```

## model에서 사용 시
```python
from django.db import models
from jumin.fields import JuminField

class YourEverythingModel(models.Model):

name = models.CharField(u'실명', max_length=20)

jumin = JuminField(u'내 주민번호')
mom_jumin = JuminField(u'엄마 주민번호')
dad_jumin = JuminField(u'아빠 주민번호')
uncle_jumin = JuminField(u'삼촌 주민번호')

your_secret = models.TextField(u'비밀정보')
...
```

## form에서 사용 시
```python
class TestForm(forms.Form):
jumin = JuminFormField()
another = CharField(label='test', max_length=10, required=False)
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-korean-fields-0.2.0.tar.gz (9.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page