Skip to main content

Django Mailformer

项目描述

=================
Django Mailformer
=================

应用程序设置
============ =====
假设你已经在你的项目 requirements.txt 中添加了这个应用程序,你
可以按照以下步骤开始使用它:

首先开始安装:

..code::console

pip install git+ssh://git@github .com/developersociety/django-mailformer.git@master#egg=django-mailformer


1) 在设置文件中将“mailformer”添加到您的应用程序。
2) 在您的 urls.py 中添加到您的 url 模式:

.. code:: console

urlpatterns = [
# all the other values
url(r'^email/', include('mailformer.urls')),
]

这些添加到的实际网址取决于您。不要在
包含中定义命名空间,因为这将阻止内部查找用于
表单和提交成功页面的 URL。但是,如果需要,可以对其进行操作
,但是您需要直接添加表单和
提交页面并覆盖 constants.URL_NAME 值。

3) 在您的模板中添加`{% load mailformer %}`
4) 无论您将显示电子邮件的位置替换为:

.. code:: console

<a href="{% get_url_by_email email_address %}">
联系表格
</a >


其中 `email_address` 是您要邮寄到的电子邮件地址。
您还可以添加其他键,以便表单获得预填充的值。

这些键是: [name, phone_number, subject, message]

字段 `identifier` 是隐藏的,但是是必需的。 5) 您应该通过创建名为“mailformer/mailformer-form.html”的提交表单和名为“mailformer/mailformer-success.html”的成功表单

来定义自己的表单 。开发设置=================建议您使用 `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_和 `The Developer Society Dev Tools <https://github.com/developersociety/tools>`_。假设您正在使用这些工具,那么开始这个项目非常简单:..code::console














$ dev-clone example_instance
$ make reset

你现在可以运行开发服务器了:

.. code:: console

$ python manage.py runserver


=======
History
=======

0.0.0 (2017-06 -14)
------------------

* 初始提交


0.0.0b (2017-06-22)
---------------- ---

* 重构为新布局

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

django-mailformer-0.0.1.tar.gz (9.4 kB 查看哈希)

已上传 source

内置分布

django_mailformer-0.0.1-py2.py3-none-any.whl (16.9 kB 查看哈希

已上传 3 5