A simple Django app to manage company contact information.
Project description
Django Tools Contact
Django Tools Contact is a simple Django app to manage a company contact information and contacts requests from a form
Installation
-
Install with pip install
django-tools-contact
. -
Add
djtools.contact
to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'djtools.contact',
]
- Add your Google Maps API key nd your contact information in your project settings:
DJTOOLS_CONTACT_GMAPS_APIKEY = "ABCDE123"
DJTOOLS_CONTACT_SITE_DOMAIN = "www.example.com"
DJTOOLS_CONTACT_MAIL_FROM = "no-reply@example.com"
DJTOOLS_CONTACT_MAIL_TO = ["admin@example.com"]
-
It has a dependency over
django-recaptcha
. Follow their instructions as well: Django ReCaptcha. -
You can use the
ContactRequestView
like this:
from djtools.contact.views import ContactRequestView
urlpatterns = [
path('contact/', ContactRequestView.as_view(), name='contact'),
]
-
Run
python manage.py migrate
to create the contact models. -
If you want to show the comapny contact information in the same page as the contact form you need to enable this setting
DJTOOLS_CONTACT_INFO=True
, then start the development server and visit http://127.0.0.1:8000/admin/ to create add the contact information (you'll need the Admin app enabled). -
Visit http://127.0.0.1:8000/contact/ to see the contact information and send contact requests.
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-tools-contact-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9617abb3f8e0558f825fda449df15d6b38cefa82e80e0c08c5072700d966515a |
|
MD5 | 4f6bc0881b16df249c4c79efed92eedf |
|
BLAKE2b-256 | 867fbc30f6b77581e91b3f414e79ae2552e1ab0f047ec5699eda9b1132869b16 |
Hashes for django_tools_contact-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae71177f8c814c62125beb828bd2dd3ca7df733d329eb5b197b1b669e1aee06e |
|
MD5 | 76d00700b2d799eebeb2db87652c0118 |
|
BLAKE2b-256 | 79d56f8156e89d3f4e4a2ad2fdd906b7231da5e950e8deb3f592df0350d1c83d |