Skip to main content

Build Status Code Climate Coverage Status Requirements Status

A Django app to serve Ember index files deployed with ember-cli-deploy.

Installation

  1. Install application using $ pip install django-ember-index.

  2. Add ember_index to your INSTALLED_APPS setting like this:

INSTALLED_APPS = (
    ...
    'ember_index',
)

Usage

  1. Register Ember application(s) at urls.py with redis’s adapter:

from ember_index import index, RedisAdapter

adapter = RedisAdapter(host='localhost')

urlpatterns = [
    index(r'^other/', 'other-app', adapter),
    index(r'^', 'my-app', adapter),
]

The provided regex is used to set router’s rootURL by replacing pregenerated baseURL environment configuration at index file.

Note that storeConfigInMeta must be set to true, otherwise an exception is raised. If base tag is present in index file, then value of href attribute will be replaced too.

If CSRF protection is enabled, then meta tag named X-CSRFToken with generated token will be provided. You can use Ember Django CSRF to enable protection on the Ember side.

All adapter’s keyword arguments will be passed into the StrictRedis object on initialization.

  1. Access application(s) at:

  • / with current revision of my-app,

  • /r/ed54cda/ with specific revision of my-app,

  • /other/ with current revision of other-app,

  • /other/r/ed54cda/ with specific revision of other-app.

License

Django Ember Index is available under the MIT license. See the LICENSE file for more info.

Metadata

Release files for django-ember-index 0.7.0

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-ember-index 0.7.0
File Size Uploaded
django-ember-index-0.7.0.tar.gz 5.5 kB Details

Release files / django-ember-index-0.7.0.tar.gz

Download URL django-ember-index-0.7.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
deacc6e4aa63b8388e15d51aff537a84ae99a8709caa28990a60d88cfcd63ae5
BLAKE2b-256 checksum
How to use checksums
ebfdc4733a8f952071f65202ae66efecf379fe4718469062bfa7072997030052
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.7.0 This release

1 release file

0.6.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

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