Skip to content

Instantly share code, notes, and snippets.

@djs070
Last active April 3, 2021 12:40
Show Gist options
  • Save djs070/d57174e302eb8f36aa25 to your computer and use it in GitHub Desktop.
Save djs070/d57174e302eb8f36aa25 to your computer and use it in GitHub Desktop.
Why write a python project template in javascript?

Background

Yeoman is a scaffolding tool written in JavaScript, supported by a who's-who of web dev legends and backed by hundreds (thousands?) of community-written generators, to bootstrap any kind of project from a simple front-end build to all kinds of framework projects.

Wagtail is a beatiful new CMS, written lovingly in Python/Django by the talented folks at Torchbox. Said folks have recently released an official Django template to get started with a Wagtail site with dependencies, Django settings and deployment ready to go - all packaged nicely into a Vagrant box.

What did I do?

I have recently ported this template to a Yeoman generator and feel that some may question why I would take a beautiful piece of python templating and turn it into JavaScript.

So what problem does it solve?

Quite simply, I wanted to avoid the cart-before-horse issue of running the correct version of Python & Django in a virtualenv before installing the same things again inside a Vagrant box.

The yeoman generator is going to be a lot less sensitive to node version bumps than the current state of hell that is version management in Python and Django (the template even mentions a specific issue on their brief readme).

TL;DR

Installing Node, Yeoman and Vagrant on your host dev machine is a clean way towards a nice scripting and project scaffolding environment to keep completely separate dependencies between all of your projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment