A Django app providing database and form fields for credit cards.
Project description
django-credit-cards
A Django app providing database and form fields for credit cards.
Compatibility
django
>= 1.8python
>= 3
Quickstart
Install django-credit-cards:
pip install django-credit-cards
Then add it to your models:
from creditcard.models import CardNumberField, CardExpiryField, SecurityCodeField
class Payment(models.Model):
cc_number = CardNumberField(_('card number'))
cc_expiry = CardExpiryField(_('expiration date'))
cc_code = SecurityCodeField(_('security code'))
Or to your forms:
from creditcard.forms import CardNumberField, CardExpiryField, SecurityCodeField
class PaymentForm(forms.Form):
cc_number = CardNumberField(label='Card Number')
cc_expiry = CardExpiryField(label='Expiration Date')
cc_code = SecurityCodeField(label='CVV/CVC')
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
Built Distribution
Close
Hashes for django_credit_cards-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a60e32cf4e48287b140efad178051ecca7488b86073b5ab741269972f4b9c995 |
|
MD5 | e9c86dca9355eb33012289e27eb8a383 |
|
BLAKE2b-256 | 789a670b16559552f85658f6449e98334620f7d1147f3f43d49ba2d2f963de33 |