Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Tools to integrate develop an Ember app using Django as the backend.

Project description


Tools to integrate develop an Ember app using Django as the backend.

It can:

* Generate an Ember app inside your Django project
* Preconfigure said app to expect Django REST Framework's JSON data
* Automatically generate Ember models based on your Django models
* Run Ember automatically alongside your Django development server,
configuring the Ember app to look for an API endpoint specified in
Django's ``.

It makes very few Django-specific changes to the internal Ember project, which
should make it easier to separate the two projects later, if you outgrow the
shared-repo strategy.


To use django_ember_toolkit, you'll need [Node](
and [Ember CLI]( See the
installation instructions at their respective sites for details.

Then just `pip install django_ember_toolkit` and add `django_ember_toolkit` to


django_ember_toolkit looks in `settings.EMBER_TOOLKIT` for a configuration
dictionary containing:

"API_PATH": "/path/to/api", #the URL at which Ember can find your REST API
"EMBER_APP_NAME": "some-name", #the name ember-cli should give your app
"EMBER_APP_PATH": "client", # optional: the filesystem path, relative to
# BASE_DIR, where the Ember project should be
# stored
"MODELS_TO_SYNC": ["auth.*", "myapp.Widget"] # models to use when
generating Ember models

Note: MODELS_TO_SYNC takes a list of model specifiers, each either
"[appname].[ModelClass]" or "[appname].*" (the latter selects all models in the
indicated app)


django_ember_toolkit exposes a set of new management commands:

* `create_ember_project`: generates a new Ember app inside your Django
project, configures it to use Django REST Framework's JSON format,
and overwrites Ember's environment.js config file to allow
django_ember_toolkit to easily "push" certain settings into Ember.

* `generate_ember_config`: generates a backend-config.js file, which is
loaded by django_ember_toolkit's modified environment.js file. This
is usually run automatically when you need it.

* `generate_ember_models`: using ember-cli's scaffolding tools, generates a
set of client-side models based on the models specified in
settings.EMBER_TOOLKIT['MODELS_TO_SYNC']. If the models already exist,
Ember CLI will ask if you want to replace them on an individual basis.

* `runserver_ember`: runs the Ember development server alongside the Django
development server.

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django_ember_toolkit, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_ember_toolkit-0.1.tar.gz (11.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page