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
django-tools-contact-0.0.1.tar.gz
(11.9 kB
view hashes)
Built Distribution
Close
Hashes for django-tools-contact-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a721b31387a8d06f4cb3bd56d613dfec36cb863c31c7b63e12160a5dc129c94e |
|
MD5 | b011ff2a32a10aedb8bd1147d8a2efbe |
|
BLAKE2b-256 | a833263575d8873d434cdf22ae0c58462b12a67bf29839f8f132ddf9084f5139 |
Close
Hashes for django_tools_contact-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad718560a60b65d3df79cce73ad633718281dc1dd5789deca50c7ce892e6fb0 |
|
MD5 | ae9f60f6af74b793cce1d15fe54d4772 |
|
BLAKE2b-256 | d5769d71ee379a4ebb57a5fc9f5d0293f479af3a65d23da9335a7eab467e978d |