Skip to main content

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',
]
  1. 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"]

  1. It has a dependency over django-recaptcha. Follow their instructions as well: Django ReCaptcha.

  2. You can use the ContactRequestView like this:

from djtools.contact.views import ContactRequestView


urlpatterns = [
    path('contact/', ContactRequestView.as_view(), name='contact'),
]
  1. Run python manage.py migrate to create the contact models.

  2. 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).

  3. 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


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-1.3.2.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

django_tools_contact-1.3.2-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page