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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b2e2d5dcf77cf0260f2a55dde408ed122f7b8b8a3e5706ae15e754516127d1 |
|
MD5 | 534cd0a4d45dee9b29112590e6d971bb |
|
BLAKE2b-256 | 662a3884ab4b279f159fd1c687c6fd3d7dc1a4b9bce04353b86f0bfacdbd7c21 |
Hashes for django_tools_contact-1.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc8a4d32666eae69ac5f2f4377d8c6762fd3d03b9fbc3d26cab4bbcb897a9b6a |
|
MD5 | c56cc17cab76821802505d4309def926 |
|
BLAKE2b-256 | a58994ff86f1183467b0e77d636d064c3854863c5e2859aada59bf1b9c6b9f55 |