Skip to main content

Twitter Bootstrap Layout for Django Contact Form

Project description

Twitter Bootstrap templates for django-contact-form.

Requirements

  • Python 2.7 or >=3.3.

  • Django >=1.6

Installation

Installation via:

pip install django-contact-form-bootstrap==0.1a1

The templates extend base.html, so the templates folder of the project should provide one, together with the Twitter Bootstrap and a JQuery library.

Then add 'bootstrapform' and 'contact_form_bootstrap' to INSTALLED_APPS, before 'contact_form'. The order is important because following apps are overwritten:

INSTALLED_APPS = (
    # ...
    'django.contrib.sites',  # For ``contact_form``.

    'bootstrapform',
    'contact_form_bootstrap',
    'contact_form',
    # ...
)

For contact_form itself, remember to add the following settings:

SITE_ID = 1

Example Project

The example project can be run to have a quick look and to check out a running setup. Download the source files and run:

virtualenv -p /usr/bin/python3 ~/myenv
source ~/myenv/bin/activate
pip install -r requirements.txt
./manage.py migrate
./manage.py runserver

Customization

To use custom templates, there are two ways to accomplish that:

  1. Overwrite a template at templates/contact_form to replace them completely.

  2. Inherit a template from templates/contact_form to overwrite only one or more of its blocks. Defining a custom URL pointing at the custom template is necessary then.

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-contact-form-bootstrap-0.1a1.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file django-contact-form-bootstrap-0.1a1.tar.gz.

File metadata

File hashes

Hashes for django-contact-form-bootstrap-0.1a1.tar.gz
Algorithm Hash digest
SHA256 10543ce8e60f4f1129c929598ab2a34ab8d083962ccf41336c747eef86fa80ed
MD5 9b5b8c8f5131ecd4834d5ff38144c5e6
BLAKE2b-256 b09642dab50018442996af6d9b2b548ff745f87b743e642ef794d43e79efdf38

See more details on using hashes here.

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