{ "info": { "author": "Julien Maupetit", "author_email": "julien@tailordev.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "TailorDev Contact\n=================\n\nA customizable contact form for your django projects.\n\nYou will find the documentation of this project on [readthedocs](http://django-tailordev-contact.readthedocs.org/).\n\n## Dependencies\n\nFor now, Django>=1.5 is the only dependency for this project to run on production, with python>=2.6. Currently, this application is not compatible with python 3.3. We are working on it.\n\n## Installation\n\nTo install TailorDev Contact, use pip:\n\n $ pip install django-tailordev-contact\n\nIf you intend to test or improve this application, first clone this repository and install the local dependencies:\n\n $ pip install -r requirements/local.txt\n\n## Configuration\n\nAdd `td_contact` and its dependencies to your `INSTALLED_APPS`:\n\n INSTALLED_APPS = (\n ...\n 'td_contact',\n ...\n )\n\nAdd `td_contact` urls to your project url patterns:\n\n urlpatterns = patterns('',\n ...\n url(r'^contact/', include('td_contact.urls')),\n ...\n )\n\nSet your `td_contact` rules in your `settings.py`, by adding something like:\n\n # Contact form\n TD_CONTACT_FORM_RULES = {\n 'default': {\n 'prefix': \"[Foo:contact]\",\n 'subject': \"General informations\",\n 'to': ('contact@foo.com', 'ceo@foo.com'),\n },\n 'partner': {\n 'prefix': \"[Foo:partner]\",\n 'subject': \"Partnership opportunity\",\n 'to': ('partner@foo.com', ),\n },\n 'jobs': {\n 'prefix': \"[Foo:jobs]\",\n 'subject': \"Job opportunity\",\n 'to': ('jobs@foo.com', ),\n },\n }\n\n`TD_CONTACT_FORM_RULES` is a simple dictionary where each key defines a new rule. Each rule is also a dictionary defining the email prefix & subject and the recipient list.\n\n> **Important note** : when a contact form has been successfully filled, the user is redirected to the website home page. Thereby, we use the [django messages framework](https://docs.djangoproject.com/en/1.5/ref/contrib/messages/) to inform our user of its request status. Remember to enable messages and add something like the following to your base template DOM:\n\n {% if messages %}\n \n {% endif %}\n\nThis example works with the [zurb foundation framework](http://foundation.zurb.com/). Feel free to adapt this for your favorite framework.\n\n## Urls\n\nTailorDev Contact form defines 3 urls you may use in your templates:\n\n### `contact_form_rule`\n\nThis url has been designed to initialize your form with your own rule, *e.g.*:\n \n {% url 'contact_form_rule' 'jobs' %}\n\n### `user_contact_form_by_slug` and `user_contact_form_by_pk`\n\nDepending on your application, people may want to contact a registered user directly and you want an elegant url to point to. To do so, use the `user_contact_form_by_slug` in your templates, *e.g.*:\n\n {% url 'user_contact_form_by_slug' myuser.slug %}\n\nAlternatively, use the `user_contact_form_by_id` in your templates, like:\n\n {% url 'user_contact_form_by_pk' myuser.pk %}\n\nTo use this feature, activate the related option in your `settings.py`:\n\n TD_CONTACT_FORM_ALLOW_DIRECT_USER_CONTACT = True\n\n### `contact_form`\n\nThis base url points to your contact form. Nothing more to add.\n\n## Templates\n\n### Using the default templates\n\nIf you want to use our default templates, feel free to do so. But please note that:\n\n* You should create a base template to inherit from, visible as `_layouts/base.html`\n* Your form will appear in a `content` block\n* Two partial templates must be customized `contact/partials/contact_recipient.html` and `contact/partials/aside.html`\n\n### Using your own template(s)\n\nThe template-to-override used to render the form is visible as `contact/form.html`. The core part of the template may looks like:\n\n
\n\n

{% trans \"Contact\" %}

\n\n {% if recipient %}\n {% include \"contact/partials/contact_recipient.html\" %}\n {% endif %}\n\n
\n {% csrf_token %}\n {% for field in form %}\n {% if field.is_hidden %}\n {{ field }}\n {% else %}\n
\n
\n \n {{ field }}\n {% if field.errors %}\n {{ field.errors }}\n {% endif %}\n
\n
\n {% endif %}\n {% endfor %}\n\n \n
\n
\n\n\n\n## Running the Tests\n\nYou can run the tests with via:\n\n python setup.py test\n\nor:\n\n python runtests.py\n\n### Code coverage\n\nTo estimate the project coverage:\n\n coverage run --source='td_contact' runtests.py\n coverage report -m", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/tailordev/django-tailordev-contact", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-tailordev-contact", "package_url": "https://pypi.org/project/django-tailordev-contact/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-tailordev-contact/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/tailordev/django-tailordev-contact" }, "release_url": "https://pypi.org/project/django-tailordev-contact/0.5.0/", "requires_dist": null, "requires_python": null, "summary": "Django TailorDev Contact A simple contact form for your django projects.", "version": "0.5.0" }, "last_serial": 1379489, "releases": { "0.3.1": [ { "comment_text": "", "digests": { "md5": "ca3ec9144b68763addc3375af8b6df48", "sha256": "0e244cece162cd07ace74ac968b2fa60d7ed4f3adbfad8bac95ea4668ccc6071" }, "downloads": -1, "filename": "django-tailordev-contact-0.3.1.tar.gz", "has_sig": false, "md5_digest": "ca3ec9144b68763addc3375af8b6df48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9433, "upload_time": "2013-11-05T21:45:38", "url": "https://files.pythonhosted.org/packages/99/c3/467f28ffaf6a244c365f1de0f1e6d00c8258d2b62fe8afbe182acbab9d54/django-tailordev-contact-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "bbe306f915cffe796d277373f53db875", "sha256": "aab710be22a11d5be9ffaaf437c313cd6219ebccc63c7f5ede0bb83cb6f3b7cd" }, "downloads": -1, "filename": "django-tailordev-contact-0.3.2.tar.gz", "has_sig": false, "md5_digest": "bbe306f915cffe796d277373f53db875", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9421, "upload_time": "2013-11-05T21:54:53", "url": "https://files.pythonhosted.org/packages/71/4c/23ba4cafaa5e41125b2c635bb7ff8d13d82ddfb3309edab3d9682cf317ba/django-tailordev-contact-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "0cb06826ca0c1087fd56d1ac0b74072b", "sha256": "5511d15df768502ab756da73d89ed069ebef66d5971479ba85a14320d5061f57" }, "downloads": -1, "filename": "django-tailordev-contact-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0cb06826ca0c1087fd56d1ac0b74072b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9676, "upload_time": "2013-11-08T21:09:39", "url": "https://files.pythonhosted.org/packages/5d/1b/e640733ab1a37ca26670f32c3a1925a4211546b384c5be56521f51e4f11b/django-tailordev-contact-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "72ccfcfedd8f415ae46abb8b457762f0", "sha256": "dabb0b930192a236ecc37fa952fa497100feab3e3ac8c6ee42563915422f813f" }, "downloads": -1, "filename": "django-tailordev-contact-0.4.1.tar.gz", "has_sig": false, "md5_digest": "72ccfcfedd8f415ae46abb8b457762f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11280, "upload_time": "2014-10-21T09:37:14", "url": "https://files.pythonhosted.org/packages/d2/c3/fcdb391a66653b7bd5550584ae3180c126fc83285bddbfc85d461b0311d1/django-tailordev-contact-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "30005585af7ad3936768107e83354489", "sha256": "54ad395e0b270ab483118e56300fe0c333791a2caf2ecdf92f32d4d222fd2e63" }, "downloads": -1, "filename": "django-tailordev-contact-0.5.0.tar.gz", "has_sig": false, "md5_digest": "30005585af7ad3936768107e83354489", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11328, "upload_time": "2015-01-12T14:26:59", "url": "https://files.pythonhosted.org/packages/55/aa/2f7a5803a2e4b1cdbf93af50e6ec1d440b2fa5e2ab2b00018d8c9ed5c26c/django-tailordev-contact-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "30005585af7ad3936768107e83354489", "sha256": "54ad395e0b270ab483118e56300fe0c333791a2caf2ecdf92f32d4d222fd2e63" }, "downloads": -1, "filename": "django-tailordev-contact-0.5.0.tar.gz", "has_sig": false, "md5_digest": "30005585af7ad3936768107e83354489", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11328, "upload_time": "2015-01-12T14:26:59", "url": "https://files.pythonhosted.org/packages/55/aa/2f7a5803a2e4b1cdbf93af50e6ec1d440b2fa5e2ab2b00018d8c9ed5c26c/django-tailordev-contact-0.5.0.tar.gz" } ] }