Cookiecutter-django: Provide option to use MySQL instead of PostgreSQL

Created on 9 Jul 2014  路  15Comments  路  Source: pydanny/cookiecutter-django

While I really prefer PostgreSQL, a lot of people use MySQL. With cookiecutter, we could pass in a new cookiecutter.json prompt:

{
"Database Engine (PostgreSQL or MySQL)": "PostgreSQL"
}

Then, in the settings template, we could use this variable for a Jinja2 conditional which would either set things up for PostgreSQL or MySQL.

Most helpful comment

@rwillmer After so many years that this issue was opened, i think that the main reason not to add MySQL and any other database, at least to me, is because we do not want to add more unpaid workload to maintain this project.

All 15 comments

Any particular reason not to ask the user to enter complete the database_url itself. ?

Because I like cookiecutter-django to do as much work as possible. :wink:

Asking about database_url mean storing password in repo (mostly). It is important to add property requirements too.

[ ] providing mysql require requirements.txt update

Upon reflection this is an option I think cookiecutter-django shouldn't support. If someone wants to create a fork that mirrors cookiecutter-django except for the use of MySQL, we'll link to it from the top README.rst file.

Hi @pydanny, I've been reading about cookiecutter-django and it looks like a great way to make Django production ready but my current hosting tier only allows MySQL. After stumbling on this issue I'm wondering is Postgres a hard requirement for cookiecutter-django, as in it won't work without it, or does it mean that cookiecutter-django's DB related features won't work? Thanks

@dmarcelino , there is only requirements and DATABASE_URL changes. I start project with cookiecutter-django and replace all postgresql-related requirements to mysql.

I see, thanks @ad-m!

Hi @pydanny I'm about to create a fork of the foundation fork with mysql support; do you want to reconsider your choice not to provide this inside cookiecutter itself? having more forks than we need just to provide a deployment choice seems overkill to me.

p.s. thanks for the cookiecutter project, it's really useful

@rwillmer After so many years that this issue was opened, i think that the main reason not to add MySQL and any other database, at least to me, is because we do not want to add more unpaid workload to maintain this project.

@rwillmer , tell me about fork with MySQL support. I would like use them.

@rwillmer, much as MySQL support would be awesome, @luzfcb is correct in that it adds too much to our support load.

As always, if you can convince your organization to come into an agreement with us to provide ongoing paid support in Cookiecutter Django for MySQL (or Foundation), then we're willing to add it in.

I totally understand, @pydanny. I'll just do it for myself, and make the fork available if anyone wants it. Thanks again for Cookiecutter Django, it's terrific.

I totally understand, @pydanny. I'll just do it for myself, and make the fork available if anyone wants it. Thanks again for Cookiecutter Django, it's terrific.

Have you created the fork with mysql support ? Please provide the link

@rwillmer Could you provide the link?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saschalalala picture saschalalala  路  4Comments

linuxluigi picture linuxluigi  路  3Comments

webyneter picture webyneter  路  3Comments

webyneter picture webyneter  路  4Comments

webyneter picture webyneter  路  3Comments