Code Monkey home page Code Monkey logo

rolandf / djangocms-forms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mishbahr/djangocms-forms

0.0 1.0 0.0 1.88 MB

The easiest and most flexible Django CMS Form builder — Create forms quickly without ever touching code. Every field type you may need is available within a simple drag and drop interface.

Home Page: https://pypi.python.org/pypi/djangocms-forms/

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.96% Python 90.22% CSS 0.35% JavaScript 4.05% HTML 4.42%

djangocms-forms's Introduction

djangocms-forms

image

Latest Version

Downloads

License

image

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.

By default, djangocms-forms will redirect a successful form submission after 1000 milliseconds (1 second). You may provide your own redirect delay value for all forms site-wide via settings:

DJANGOCMS_FORMS_REDIRECT_DELAY = 10000  # 10 seconds

or on a per-form basis via the redirect_delay field. The order of precedence for the redirect value is always:

instance.redirect_delay > DJANGOCMS_FORMS_REDIRECT_DELAY > 1000 (default)

Preview

image

image

image

image

image

You may also like...

djangocms-forms's People

Contributors

alsoicode avatar driesdesmet avatar mishbahr avatar rda-dev avatar selectnull avatar tdsymonds avatar vstoykov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.