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
1. Install with pip install `django-tools-contact`.
2. Add `djtools.contact` to your INSTALLED_APPS setting like this:
```
INSTALLED_APPS = [
...
'djtools.contact',
]
```
3. 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"]
```
4. It has a dependency over `django-recaptcha`. Follow their instructions as well:
[Django ReCaptcha](https://github.com/praekelt/django-recaptcha).
5. Add the settings context processor to use the `DJTOOLS_CONTACT_GMAPS_APIKEY` in your templates.
```
TEMPLATES = [
{
'OPTIONS': {
'context_processors': [
...
'djtools.contact.context_processors.settings_context',
],
},
},
]
```
6. You can use the `ContactRequestView` like this:
```
from djtools.contact.views import ContactRequestView
urlpatterns = [
path('contact/', ContactRequestView.as_view(), name='contact'),
]
```
7. Run `python manage.py migrate` to create the contact models.
8. 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).
9. Visit http://127.0.0.1:8000/contact/ to see the contact information and send contact requests.
## References
https://github.com/pydanny/cookiecutter-djangopackage/
Django Tools Contact is a simple Django app to manage a company contact information and contacts
requests from a form
## Installation
1. Install with pip install `django-tools-contact`.
2. Add `djtools.contact` to your INSTALLED_APPS setting like this:
```
INSTALLED_APPS = [
...
'djtools.contact',
]
```
3. 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"]
```
4. It has a dependency over `django-recaptcha`. Follow their instructions as well:
[Django ReCaptcha](https://github.com/praekelt/django-recaptcha).
5. Add the settings context processor to use the `DJTOOLS_CONTACT_GMAPS_APIKEY` in your templates.
```
TEMPLATES = [
{
'OPTIONS': {
'context_processors': [
...
'djtools.contact.context_processors.settings_context',
],
},
},
]
```
6. You can use the `ContactRequestView` like this:
```
from djtools.contact.views import ContactRequestView
urlpatterns = [
path('contact/', ContactRequestView.as_view(), name='contact'),
]
```
7. Run `python manage.py migrate` to create the contact models.
8. 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).
9. Visit http://127.0.0.1:8000/contact/ to see the contact information and send contact requests.
## References
https://github.com/pydanny/cookiecutter-djangopackage/
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
Close
Hashes for django-tools-contact-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffa852fbad9be33fd49cc5a23320bab43b45e4edae8e18877c04f7830586af16 |
|
MD5 | 5cbaa29d12a89bd3645e155bd0fb5d53 |
|
BLAKE2b-256 | 104eece50c85f7f11be98583e3b3962b73164c6d85feee620d1c4c1f4cba5352 |
Close
Hashes for django_tools_contact-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7744c99c3f42427ef3e3c68c34f38d1affa20dbbd98c4bdb2a0ed19a0b0cb92f |
|
MD5 | a08c28c5c8924871c769f82cfaeeb6e5 |
|
BLAKE2b-256 | 19176e0b335ca39f34ea429b9c29c18b3a474f43fe01a2a74457849ac3206f59 |