Skip to main content

What Apollo Is

At Morgan & Morgan, the development team builds lots of forms. A lot. While most of the heavy lifting for form management was done for us by the marketing platform, Hubspot, there were some major gaps that forced us to consider a switch:

  1. Cost. Our Hubspot license was > $50,000 yearly where the only utility came from the form management tooling.
  2. Lack of flexibility. While defining basic validation rules and field layouts was OK, doing anything more complex (e.g. email blacklists, geo-based submission filtering, etc.) was impossible. In fact, since their switch to React rendered forms, custom validation in a Hubspot form doesn't work at all.
  3. Lack of control. The Hubspot JS library is 300kb+ in size before gzip and sets short-term cache expiration headers. Why? It's hard to say without access to the unminified source.
    more than 300kb
  4. Lack of transparency. Hubspot provides Salesforce syncing out of the box. However, having a highly customized Salesforce Org, our Hubspot sync process was anything but straightforward.

With these problems in mind, we built Apollo as a solution.

Apollo is a Django application which - in conjunction with the Icarus Javascript Library - aims to act as a plug-and-play solution for the busy engineer. In addition to providing a management interface for building form fields, designing forms, and viewing form submissions, Apollo makes the assumption that it should make no assumptions about domain specific requirements of the host application. Thus, it decouples form management from submission processing, leaving the job of reacting to events within the host. To facilitate this architecture, Apollo opts for a Pub/Sub design, notifying listeners on key events:

  • form submitted
  • form submission validated
  • form submission error

See more details on signals in the signals reference

Why Apollo

  1. It is - and always will be - free and open source
  2. Plug-and-play architecture
  3. Utility in a wide variety of use case
  4. Integration with native Django permissions, allowing for role assignment when delegating API / form builder access.

Installation

pip install django-apollo-forms

# add the App to the list of INSTALLED_APPS
INSTALLED_APPS = {
  ...  
  'django_filters',
  'rest_framework',
  'rest_framework_swagger', # optional, creates browsable API docs
  'apollo',
  ...
}

# run the migrations to generate DB tables
python manage.py makemigrations apollo
python manage.py migrate apollo

# collectstatic to generate the static files for the form builder interface
python manage.py collectstatic

Customization

You can customize the behavior of Apollo by overriding the defaults of the APOLLO variable in your settings.py. Below are the parameters which may be controlled in this setting.

Parameter Default Description
BUILDER_ROOT_PREFIX "" The path at which the Apollo form builder is mounted in the host application
BUILDER_REQUIRES_IS_STAFF True If True, then only users with is_staff permissions can access the form builder
DOWNLOAD_REQUIRES_IS_STAFF True If True, then only users with is_staff permissions can download form submissions
API_ROOT /api The path to the API root on the server
API_VERSION v1 The Apollo API version
ICARUS_THEMES_URL //static.forthepeople.com/engineering/icarus/v1.0-latest/themes Location where icarus themes are located
SUBMISSION_EMAIL_FROM None Email address to send submission notifications from
EXTERNAL_HOOKS_SIGNAL_ONLY True If True, then we we do not send webhooks notifications, only trigger a signal
DEFAULT_FORM_SUBMISSION_SERIALIZER apollo.api.v1.serializers.FormSubmissionSerializer Dotted path to a serializer class to use for FormSubmission objects

Example

APOLLO = {
    "BUILDER_ROOT_PREFIX": "/apollo"
}

Features

Setup field templates for your forms. These define the default configurations for fields and can be overridden on a per-form basis.


Step-by-step form builder interface.


Powerful layout creator with the ability to apply different layouts for desktop and mobile screens.


Form Usage

When it comes to actually using the forms built by Apollo, you have two options:

  1. Use the Icarus Javascript Library (Recommended)
  2. DIY.

If you decide to pursue (2), you'll want to consult the Browsable API, mounted at /<API_ROOT>/<API_VERSION>/docs for details on authentication, request format, and available resources.

Development

Getting Started

Bringing up a new dev environment should be fairly straightforward. Run docker-compose up -d to bring up a complete development environment.

Building Releases

Create a virtualenv then run pip install -r requirements.txt in order to install versioning utilities. Run bumpversion <SEMVER> to create a buildable version then push upstream to trigger CI.

Release files for django-apollo-forms 2.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-apollo-forms 2.2.5
File Size Uploaded
django_apollo_forms-2.2.5.tar.gz 826.7 kB Details

Release files / django_apollo_forms-2.2.5.tar.gz

Download URL django_apollo_forms-2.2.5.tar.gz
Size 826.7 kB
Tags Source
SHA-256 checksum
How to use checksums
82bbfc36964b1f1822532097331a71aee8036d8a8df396dd3170e65f68ecf3ad
BLAKE2b-256 checksum
How to use checksums
53f8370f1e54e1e3401f257e84759c17d5d6cd6636866fd58624f5f1bad755e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release history Release notifications | RSS feed

This release

2.2.5 This release

1 release file

2.2.4

1 release file

2.2.3

1 release file

2.2.2

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.1.2

1 release file

2.1.0

1 release file

2.0.6

1 release file

2.0.5

1 release file

2.0.4

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

1.15.4

1 release file

1.15.3

1 release file

1.15.2

1 release file

1.15.1

1 release file

1.14.5

1 release file

1.13.0

1 release file

1.12.2

1 release file

1.12.1

1 release file

1.12.0

1 release file

1.11.1

1 release file

1.11.0

1 release file

1.9.0

1 release file

1.8.1

1 release file

1.8.0

1 release file

1.7.1

1 release file

1.7.0

1 release file

1.6.1

1 release file

1.6.0

1 release file

1.5.5

1 release file

1.5.4

1 release file

1.5.3

1 release file

1.5.2

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.2.12

1 release file

0.2.11

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.3

1 release file

0.2.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page