Modern Python Projects Transcripts
Chapter: Cookiecutter templates
Lecture: Tip on how I use cookiecutter

Login or purchase this course to watch this video and the rest of the course contents.
0:00 I want to give you a quick tip on how I use cookie cutter templates.
0:04 I've noticed that it's much easier to remove things from a project than to write everything
0:09 yourself. So what I usually do is I take a very popular cookie cutter template
0:14 and I generate a project with all the options enabled or disabled according to what
0:20 I need. If I don't know how to configure something,
0:23 I leave the default value. And then once the project is generated,
0:27 I go through all the features and I start removing what I'm not going to use
0:31 For example, in this Django project,
0:34 let's see what we have. There are a lot of files,
0:38 but for example, if for some reason you are not going to use pytest
0:41 you can remove pytest in it.
0:44 If you're not going to use GitHub,
0:45 actions you can remove, GitHub actions folder, if by accident You selected Docker
0:52 during the configuration, but you're not actually using docker.
0:55 You can remove all those doctor related files.
0:58 dockerignore, the compose folder and so on.
1:02 And if you notice that you always remove the same parts of a cookie cutter template
1:05 you might consider writing your own template.
1:09 That way you can customize what features your projects will have.
1:13 So, let's talk about writing around templates in the next lesson.