This is a minimal, but runnable Django app called 𝜇Django.
My goal was to create a runnable Django snippet that included a model.
I found several useful resources, but most no longer work under Django 1.11:
- a related discussion on Stack Overflow
- the Django wiki article on dynamic models
- mini_django.py gist based on a blog post about running Django in one file
- posts on Django in one file that just don't include models: Olifante and software maniacs
Later, I found Nsukami's blog post (no longer on line) that included a web server, so I merged in those features and automated the migrations.
There might be some useful ideas in Adam Johnson's blog.