django模型的gst和pan number字段。
django-gst-field的Python项目详细描述
django gst字段
为Goods and Services Tax
和Permanent Account Number
包括:
GSTField
,表单和模型字段PANField
,表单和模型字段
安装
pip install django-gst-field
基本用法
将gst_field
添加到django中已安装的应用程序列表settings.py
文件:
INSTALLED_APPS=[...'gst_field',...]
模型使用
fromdjango.confimportsettingsfromdjango.db.modelsimportForeignKey,CASCADE,Modelfromgst_field.modelfieldsimportGSTField,PANFieldclassTax(Model):user=ForeignKey(settings.AUTH_USER_MODEL,on_delete=CASCADE)gstin=GSTField()pan=PANField()