Skip to main content

The easiest and most flexible Django CMS Form builder w/ ReCaptcha v2 support!

Project description

http://img.shields.io/travis/mishbahr/djangocms-forms.svg?style=flat-square Latest Version Downloads License http://img.shields.io/coveralls/mishbahr/djangocms-forms.svg?style=flat-square

This project requires django-cms v3.0 or higher to be properly installed and configured.

This package is compatible with Aldryn.

Quickstart

  1. Install djangocms-forms:

    pip install djangocms-forms
  2. Add djangocms_forms to INSTALLED_APPS:

    INSTALLED_APPS = (
        ...
        'djangocms_forms',
        ...
    )
  3. Sync database tables (requires south>=1.0.1 if you are using Django 1.6.x):

    python manage.py migrate
  4. Add djangocms_forms.urls to your project’s urls module or create a django CMS page to hook the application into. In Advanced Settings, set its Application to Forms (this requires a server restart):

    urlpatterns = patterns(
        ...
        url(r'^', include('djangocms_forms.urls')),
        ...
    )
  5. To use reCAPTCHA for spam protection, you need to sign up for an API key pair for your site:

    DJANGOCMS_FORMS_RECAPTCHA_PUBLIC_KEY = '<recaptcha_site_key>'
    DJANGOCMS_FORMS_RECAPTCHA_SECRET_KEY = '<recaptcha_secret_key>'

You can register a new site via https://www.google.com/recaptcha/admin

Configuration

Plugin(s) Module - If module is None, plugin is grouped Generic group:

DJANGOCMS_FORMS_PLUGIN_MODULE = _('Generic')

Name of the plugin:

DJANGOCMS_FORMS_PLUGIN_NAME = _('Form')

The path to the default template used to render the template:

DJANGOCMS_FORMS_DEFAULT_TEMPLATE = 'djangocms_forms/form_template/default.html'

or override the Form Template dropdown choices to have different template options:

DJANGOCMS_FORMS_TEMPLATES = (
    ('djangocms_forms/form_template/default.html', _('Default')),
)

HTML5 required - When set to True all required fields inputs will be rendered with HTML5 required=required attribute:

DJANGOCMS_FORMS_USE_HTML5_REQUIRED = False

By default, djangocms-forms adds additional css classes to all form inputs. e.g. a Text field generates an <input class="textinput"> You can override this to integrate your own CSS framework:

DJANGOCMS_FORMS_WIDGET_CSS_CLASSES = {'__all__': ('form-control', ) }

e.g. the above setting would generate <input class"form-control" .... for all fields.

Preview

http://mishbahr.github.io/djangocms-forms/assets/resized/djangocms_forms_001.jpeg http://mishbahr.github.io/djangocms-forms/assets/resized/djangocms_forms_005.jpeg http://mishbahr.github.io/djangocms-forms/assets/resized/djangocms_forms_002.jpeg http://mishbahr.github.io/djangocms-forms/assets/resized/djangocms_forms_003.jpeg http://mishbahr.github.io/djangocms-forms/assets/resized/djangocms_forms_004.jpeg

You may also like…

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

djangocms-forms-0.1.14.tar.gz (133.5 kB view details)

Uploaded Source

File details

Details for the file djangocms-forms-0.1.14.tar.gz.

File metadata

File hashes

Hashes for djangocms-forms-0.1.14.tar.gz
Algorithm Hash digest
SHA256 7a95e08f8caf1eba0d2d92d696f5682324b5d68b195db4b35da1fb50fb92f412
MD5 dfc4f5e334bad40e4e521bc1e78a050e
BLAKE2b-256 1a7bdd45cad3b39b5433fe76c1b720565ac8b9174805734c9edd69278ab7857c

See more details on using hashes here.

Supported by

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