Skip to main content

A simple contact form widget for Django

Project description

https://img.shields.io/badge/license-MIT-blue.svg?maxAge=2592000 https://img.shields.io/pypi/pyversions/Django.svg?maxAge=2592000

A simple contact form widget for Django.

http://i.imgur.com/2dzKO2s.png

Install

Django Contact Widget is available directly from PyPI:

$ pip install django-contact-widget

*). And don’t forget to add contact_widget to your INSTALLED_APPS.

Database Migration

$ ./manage.py makemigrations contact_widget
$ ./manage.py migrate contact_widget

Requirement

  • Django>=1.10.1

Setting Configuration

Email Configuration in file of settings.py

EMAIL_HOST = 'smtp.gmail.com'  # eg: 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'your_email@domain.com'
EMAIL_HOST_PASSWORD = 'your_password'
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

URL configuration

The easiest way to set up the views in django-contact-widget is to just use the provided URLconf, found at contact_widget.urls. You can include it wherever you like in your site’s URL configuration; for example, to have it live at the URL /contact/:

from django.conf.urls import include, url

urlpatterns = [
    # ....
    url(r'^contact/', include('contact_widget.urls')),
]

Usage

Include the tempalte from contact_widget/contact.html to your sidebar for example.

{% include "contact_widget/contact.html" %}

License

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

django-contact-widget-1.0.2.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file django-contact-widget-1.0.2.tar.gz.

File metadata

File hashes

Hashes for django-contact-widget-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a6c07d02f34e890d9a928932c1800a56d2180908a0d66a0cfdbb37eb2ed9f2bc
MD5 98bec76b4326bb029137adce002a8b37
BLAKE2b-256 da29f68eb32217a328518466218dac310796849c51295ee01e95807f2a47dc73

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page