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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6df3cabbd6137741d7c1632391848810a914b33d24617497c3ca5ca0e756129 |
|
MD5 | 75bb645ce77edd334dfdc660cac521ef |
|
BLAKE2b-256 | 6a70b241589e0919eb70b10b4d945dc4fb83e940fd659103f4aa64d73c9c745e |
Hashes for django_tools_contact-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0bc07100e3fe4f616aa34ae8af3653717df3fb511f2df9902eb5426861651dd |
|
MD5 | caf241fe5b237be04e09d761ed6d8296 |
|
BLAKE2b-256 | 9ab7918b27c2b1bf68aed381ee900b2daeb7cd269f3f97efcf7235c6d4f02499 |