Skip to content

balexander85/django-contact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contact

Simple web app for a contact form.

Developed using python 3.7 and django 2.1

Quick start

  1. Add "contact" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'contact',
    ]
  2. Run python manage.py migrate to create the contact model.
  3. Add following to urls.py:

    from contact.views import ContactView
    
    urlpatterns = [
    path('contact/', ContactView.as_view(), name='index'),
    ...
    ]
  4. Start the development server and visit http://127.0.0.1:8000/contact/ to see contact form and create submission.
  5. Visit http://127.0.0.1:8000/admin/ to manage contact submissions (you'll need the Admin app enabled).
  6. (OPTIONAL) Email configuration:

    # in settings.py
    # EMAIL
    EMAIL_BACKEND = 'EMAIL_BACKEND'
    EMAIL_HOST_USER = 'EMAIL_HOST_USER'
    # OPTIONALLY use mailgun.com to send emails
    MAILGUN_ACCESS_KEY = 'MAILGUN_ACCESS_KEY'
    MAILGUN_SERVER_NAME = 'MAILGUN_SERVER_NAME'
    FORM_OWNER_EMAIL = 'FORM_OWNER_EMAIL'
    # Set to True to enable email feature
    EMAIL_CONFIGURED = False

About

Quickly add contact form to Django project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published