任何型号和任何字段的django电子邮件确认。
django-email-confirm-la的Python项目详细描述
版权所有(c)2014 VINTA
特此免费授予获得本软件和相关文档文件(以下简称"软件")副本的任何人在不受限制的情况下处理本软件中的
,包括但不限于使用、复制、修改的权利,合并、发布、分发、再授权和/或出售本软件的
副本,并允许向其提供本软件的人员这样做,但须满足以下条件:
上述版权声明和本许可声明应包含在所有
副本或实体中。软件的所有部分。
软件按"原样"提供,无任何形式的明示或暗示保证,包括但不限于适销性保证,
适用于特定目的和不侵权。在任何情况下,
作者或版权持有人均不对任何索赔、损害或其他
责任负责,无论是在合同诉讼、侵权诉讼或其他诉讼中,由软件或
软件的使用或其他交易引起的或与之相关的。N:Django-电子邮件-确认-la
==============
。图片:http://img.shields.io/travis/vinta/django-email-confirm-la/master.svg?style=flat-square
:目标:https://travis-ci.org/vinta/django-email-confirm-la
。图片::https://img.shields.io/工作服/vinta/django-电子邮件-确认-la/master.svg?style=flat-square
:目标:https://coveralls.io/github/vinta/django-email-confirm-la
。图片::http://img.shields.io/pypi/v/django-电子邮件-确认-la.svg?style=flat-square
:目标:https://pypi.python.org/pypi/django-email-confirm-la
requirements
==br/>-django(1.5、1.6、1.7、1.8、1.9)
/code-block::bash
$pip install django-email-confirm-la
在"设置"中添加"确认应用程序的电子邮件"(将其放在*应用程序之后),并设置所需设置:
`。代码-块::python
installed apps=(
"您的应用程序"
"电子邮件确认您的应用程序"
"电子邮件确认la http protocol="https"
电子邮件在域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的自动登录中的域中的域中的域中的自动登录中的域中的域中的域中的自动登录中的域中的域中的域中的域中的域中的自动登录中的域中的域中的域中的域中的域中的自动登录中的域中的域中的域中的自动登录中的域中的域中的域中的自动登录中的域中的域中的域中的域中的域中的域中的域中的域中的自动登录中的域中的>>><<
代码-块::python
urlpatterns=[
url(r'^email confirmation/',include('email confirm u la.url',namespace='email confirm u la'),
…代码-block::bash
==
代码-block::python
name='vinta')
email='vinta.chen@gmail.com'
emailconfirmation.objects.verify_email_for_object(email,user)
/>……代码块::python
from django.db import models
from django.contrib.contenttypes.fields从django.contrib.contenttypes.generic import generic relation导入generic relation
dels.model):
…
客户支持电子邮件=models.emailfield(最大长度=255,空值=真,空值=真)
营销电子邮件=models.emailfield(最大长度=255,空值=真,空值=真)
…
al,但建议您在执行级联删除时
email_confirmations=genericreation('email_confirmation_la.emailconfirmation',content_field='content_type',object_id_field='object_id')
/>……代码块::python
_电子邮件对象(
email='marvin@therestaurantattheendoftheuniverse.com',
content\u object=some\u model\u instance,
email\u field\u name='customer\u support\u email'
)
emailconfirmation.objects.verify\u emailr_u对象(
email='arthur.dent@therestaurantattheendoftheunienverse.com',
content戋u object=some戋u model戋u instance,
email戋u field戋u name='marketing戋email'
-``在您的"models.py`:
代码块::python
来自django。dispatch import receiver
来自email_confirm_la。signals import post_email_confirm_confirm
@receiver(post_email_confirm_confirm)
def post_email_confirm_confirm_call返回(发件人,确认,**kwargs):
model\u instace=confirmation.content\u object
email=confirmation.email
old\u email=kwargs['old\u email']
do\u your\u stuff()
commands
=====
…代码块::bash
$python manage.py clear\u expired\u电子邮件确认
mail_confirm_la`` app in`` installed_apps``是在应用程序之后,您将在其中放置自定义模板,以便'django.template.loaders.app_directories.loader<;https://docs.djangoproject.com/en/dev/ref/templates/api/django.template.loaders.app_directories.loader>;``查找*您的*项目首先是车牌。
可以覆盖以下模板:
*``电子邮件确认/email/email确认/subject.txt``:生成电子邮件的主题行。
*``电子邮件确认/email/email确认/email确认/message.html``:html电子邮件正文。
*``电子邮件确认/email确认/success.html```:用户单击确认链接后看到的内容(成功时)。
*``电子邮件确认/email_confirmation_fail.html:``单击无效的确认链接后用户看到的内容。
*``电子邮件确认/e-mail确认/u过期。html:``单击过期的确认链接后用户看到的内容。
应用程序设置的默认值:
…代码块::python
email_confirm_la_http_protocol='http'
email_confirm_la_domain='example.com'
email_confirm_la_confirm_expire sec=60*60*24*1 1天
email_confirm_la_confirm_url_reverse_name='email_confirm_ LA:确认电子邮件"
电子邮件确认模板{}
电子邮件确认自动登录=false
运行测试
==
……代码块::bash
$pip install-r requirements\u test.txt
$python setup.py test
更改
=
2.3.0(2016-09-09)
+++++++++++br/>
-支持通过"电子邮件确认"自动登录设置在电子邮件确认后自动登录
-使用"uuid.uuid4()"来生成ATE确认键
2.2.0(2016-07-25)
+++++++++-07-25)
+++++++++++++++**
-全面重构
-放弃对django 1.4的支持
0.2.3(2015-03-08)
+++++++++++br/>
-修复` ` 14<;https://github.com/vinta/django电子邮件确认la/issues/14>;` ` `管理员提出` attributeerror"当"content\u object"不存在时
0.2.2(2014-11-13)
++++++++一个域``默认值为`````,失败快
-修复循环导入
0.2.1(2014-11-09)
+++++++++++
-django 1.6兼容性:``transaction.atomic``
-django 1.4兼容性:``更新字段``
0.2.0(2014-11-08)
+++++++++++
关键字:django、电子邮件、邮件、确认、确认、内容类型
平台:未知
分类器:开发状态::4-测试版
分类器:环境::Web环境
分类器:框架::django
分类器:预期受众::开发人员
分类器:许可证::操作系统我批准了::mit许可证
分类器:操作系统::操作系统无关
分类器:编程语言::python
分类器:编程语言::python::2
分类器:编程语言::python::2.6
分类器:编程语言::python::2.7
分类器:编程语言::python::3
分类器:编程语言::python::3.3
分类器:编程语言::python::3.4
分类器:编程语言::python::3.5
分类器:主题::通信::电子邮件
分类器:主题::Internet
分类器:主题::软件开发::库
分类器:主题::软件开发::库::python模块
分类器:主题::u效用
特此免费授予获得本软件和相关文档文件(以下简称"软件")副本的任何人在不受限制的情况下处理本软件中的
,包括但不限于使用、复制、修改的权利,合并、发布、分发、再授权和/或出售本软件的
副本,并允许向其提供本软件的人员这样做,但须满足以下条件:
上述版权声明和本许可声明应包含在所有
副本或实体中。软件的所有部分。
软件按"原样"提供,无任何形式的明示或暗示保证,包括但不限于适销性保证,
适用于特定目的和不侵权。在任何情况下,
作者或版权持有人均不对任何索赔、损害或其他
责任负责,无论是在合同诉讼、侵权诉讼或其他诉讼中,由软件或
软件的使用或其他交易引起的或与之相关的。N:Django-电子邮件-确认-la
==============
。图片:http://img.shields.io/travis/vinta/django-email-confirm-la/master.svg?style=flat-square
:目标:https://travis-ci.org/vinta/django-email-confirm-la
。图片::https://img.shields.io/工作服/vinta/django-电子邮件-确认-la/master.svg?style=flat-square
:目标:https://coveralls.io/github/vinta/django-email-confirm-la
。图片::http://img.shields.io/pypi/v/django-电子邮件-确认-la.svg?style=flat-square
:目标:https://pypi.python.org/pypi/django-email-confirm-la
requirements
==br/>-django(1.5、1.6、1.7、1.8、1.9)
/code-block::bash
$pip install django-email-confirm-la
在"设置"中添加"确认应用程序的电子邮件"(将其放在*应用程序之后),并设置所需设置:
`。代码-块::python
installed apps=(
"您的应用程序"
"电子邮件确认您的应用程序"
"电子邮件确认la http protocol="https"
电子邮件在域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的域中的自动登录中的域中的域中的域中的自动登录中的域中的域中的域中的自动登录中的域中的域中的域中的域中的域中的自动登录中的域中的域中的域中的域中的域中的自动登录中的域中的域中的域中的自动登录中的域中的域中的域中的自动登录中的域中的域中的域中的域中的域中的域中的域中的域中的自动登录中的域中的>>><<
代码-块::python
urlpatterns=[
url(r'^email confirmation/',include('email confirm u la.url',namespace='email confirm u la'),
…代码-block::bash
==
代码-block::python
name='vinta')
email='vinta.chen@gmail.com'
emailconfirmation.objects.verify_email_for_object(email,user)
/>……代码块::python
from django.db import models
from django.contrib.contenttypes.fields从django.contrib.contenttypes.generic import generic relation导入generic relation
dels.model):
…
客户支持电子邮件=models.emailfield(最大长度=255,空值=真,空值=真)
营销电子邮件=models.emailfield(最大长度=255,空值=真,空值=真)
…
al,但建议您在执行级联删除时
email_confirmations=genericreation('email_confirmation_la.emailconfirmation',content_field='content_type',object_id_field='object_id')
/>……代码块::python
_电子邮件对象(
email='marvin@therestaurantattheendoftheuniverse.com',
content\u object=some\u model\u instance,
email\u field\u name='customer\u support\u email'
)
emailconfirmation.objects.verify\u emailr_u对象(
email='arthur.dent@therestaurantattheendoftheunienverse.com',
content戋u object=some戋u model戋u instance,
email戋u field戋u name='marketing戋email'
-``在您的"models.py`:
代码块::python
来自django。dispatch import receiver
来自email_confirm_la。signals import post_email_confirm_confirm
@receiver(post_email_confirm_confirm)
def post_email_confirm_confirm_call返回(发件人,确认,**kwargs):
model\u instace=confirmation.content\u object
email=confirmation.email
old\u email=kwargs['old\u email']
do\u your\u stuff()
commands
=====
…代码块::bash
$python manage.py clear\u expired\u电子邮件确认
mail_confirm_la`` app in`` installed_apps``是在应用程序之后,您将在其中放置自定义模板,以便'django.template.loaders.app_directories.loader<;https://docs.djangoproject.com/en/dev/ref/templates/api/django.template.loaders.app_directories.loader>;``查找*您的*项目首先是车牌。
可以覆盖以下模板:
*``电子邮件确认/email/email确认/subject.txt``:生成电子邮件的主题行。
*``电子邮件确认/email/email确认/email确认/message.html``:html电子邮件正文。
*``电子邮件确认/email确认/success.html```:用户单击确认链接后看到的内容(成功时)。
*``电子邮件确认/email_confirmation_fail.html:``单击无效的确认链接后用户看到的内容。
*``电子邮件确认/e-mail确认/u过期。html:``单击过期的确认链接后用户看到的内容。
应用程序设置的默认值:
…代码块::python
email_confirm_la_http_protocol='http'
email_confirm_la_domain='example.com'
email_confirm_la_confirm_expire sec=60*60*24*1 1天
email_confirm_la_confirm_url_reverse_name='email_confirm_ LA:确认电子邮件"
电子邮件确认模板{}
电子邮件确认自动登录=false
运行测试
==
……代码块::bash
$pip install-r requirements\u test.txt
$python setup.py test
更改
=
2.3.0(2016-09-09)
+++++++++++br/>
-支持通过"电子邮件确认"自动登录设置在电子邮件确认后自动登录
-使用"uuid.uuid4()"来生成ATE确认键
2.2.0(2016-07-25)
+++++++++-07-25)
+++++++++++++++**
-全面重构
-放弃对django 1.4的支持
0.2.3(2015-03-08)
+++++++++++br/>
-修复` ` 14<;https://github.com/vinta/django电子邮件确认la/issues/14>;` ` `管理员提出` attributeerror"当"content\u object"不存在时
0.2.2(2014-11-13)
++++++++一个域``默认值为`````,失败快
-修复循环导入
0.2.1(2014-11-09)
+++++++++++
-django 1.6兼容性:``transaction.atomic``
-django 1.4兼容性:``更新字段``
0.2.0(2014-11-08)
+++++++++++
关键字:django、电子邮件、邮件、确认、确认、内容类型
平台:未知
分类器:开发状态::4-测试版
分类器:环境::Web环境
分类器:框架::django
分类器:预期受众::开发人员
分类器:许可证::操作系统我批准了::mit许可证
分类器:操作系统::操作系统无关
分类器:编程语言::python
分类器:编程语言::python::2
分类器:编程语言::python::2.6
分类器:编程语言::python::2.7
分类器:编程语言::python::3
分类器:编程语言::python::3.3
分类器:编程语言::python::3.4
分类器:编程语言::python::3.5
分类器:主题::通信::电子邮件
分类器:主题::Internet
分类器:主题::软件开发::库
分类器:主题::软件开发::库::python模块
分类器:主题::u效用