is there a way I can change the main skeleton templates in PyCharm?
Whenever I start a new (for example) Flask project I have to alter the skeleton to fit my needs. It would be great if I could say PyCharm to start a new project with a static folder and a template folder, a specific base.html, database template and so on...
Is this somehow possible?
Adding a new skeleton or alter an existing one would be what I need. Any ideas?
This kind of customization is only possible by writing a plugin. The only thing that can be changed without writing a plugin is the main.py that PyCharm generates: it can be changed under Settings | File Templates | Flask Main.
I just took a look at the plugin directory, and I think it's probably possible right now, although not for the faint of heart.
Look in PyCharm/plugins/pycharm-flask/ and it looks like there's a jar with the template files in it:
I replaced the Flask\ Main.py.ft file and it worked for me. Here's how I did it:
I closed PyCharm entirely, no open windows, no running processes, then in a shell:
Then started up PyCharm and started a new project, specifying Flask as the type:
And when it opened up:
For what it's worth, this method is an extremely hacky means to an end. If you just want to change the default main, this works in a pinch if you're not picky.
If you want to do it the pro way, you can get the source code for the Flask plugin from the Intellij Plugin GIT. If you follow the instructions on Jetbrain's webpage they explain how to download the community version of Intellij and how to build and package plugins.