A simple contact form widget for Django.
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
contact_widget-1.0.0.tar.gz
(4.9 kB
view details)
File details
Details for the file contact_widget-1.0.0.tar.gz.
File metadata
- Download URL: contact_widget-1.0.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4919e39e5391897e082b43a550f545e5fbb812a94909b7be42abf206fd037089
|
|
| MD5 |
af6f61b9d0ee523e14f30dca221cec7d
|
|
| BLAKE2b-256 |
79f9ede1e91850db55f6d5c383fe6f23d2a2920c8a2903df198890cce6fbfe53
|