Cookiecutter Template

I’ve started work on a cookiecutter template for creating new anvil apps.

(Cookiecutter is a tool for creating new projects from templates. You run a single command, answer a few questions and your project is created with all the necessary files and folders in the right place with the right content).

It includes my navigation module which I’ve now also released on github:

and I plan to add the other various bits and pieces that I commonly include when I’m starting a new app as options.

This has been on my mind for a while but was made so much easier to do by the recent release of the app server!

6 Likes

This now has an option to include the excellent Hash Routing module by @stucork

2 Likes

Now with an option to include

1 Like

@owen.campbell these are awesome. thank you.

what is your workflow to get your apps into the Anvil IDE and then keep them in sync with your external repo? Or, you don’t bother?

in my mind, at the moment, it would mean creating an app in the IDE, cloning the GitHub app locally, setting the Anvil IDE app as the remote upstream. Then push to upstream to get your scaffold up, do edits on the IDE, and then fetch upstream/master, merge, and push to GitHub.

Phew… Maybe there is an easier way?

1 Like

Thank you kindly!

I have my current workflow described in a gist Hope it helps.

2 Likes

Thank you! That is awesome.

1 Like

Hi @owen.campbell I get this error when running the script

KeyError: “filename ‘meatballs-anvil-navigation-ef45dbe\\client_code\\navigation.py’ not found”
ERROR: Stopping generation because post_gen_project hook script didn’t exit successfully
Hook script failed (exit status: 1)


Sorry, that’s out of date these days. It’s been superseded by anvil extras