A rough demo of using nested inlines and knockout js to create a wysiwyg interface in the django admin
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
apps
.gitignore
README.md
requirements.txt
setup.sh

README.md

This is a rough demo of the techniques discussed in my DjangoCon US 2015 talk “Building theatlantic.com homepage’s WYSIWYG admin with Django and Knockout.”

To get started, clone the repo and run ./setup.sh from the root directory, then activate the virtualenv and execute the following commands:

python apps/manage.py syncdb
python apps/manage.py runserver

Files of interest in this repository (all situated within the folder apps/curation_nouveau):

static/curation_nouveau/js/homepage.js
The file that iterates over the fields and builds and initializes the knockout models.
static/curation_nouveau/js/homepage-models.js
The knockout viewmodel classes
templates/admin/curation_nouveau/homepagesection/change_form.html
The django template containing the knockout template markup.