Skip to content

Comments

Use sqlite:///db.sqlite3 as the default DATABASE_URL#69

Open
LEW21 wants to merge 2 commits intodoismellburning:masterfrom
LEW21:patch-3
Open

Use sqlite:///db.sqlite3 as the default DATABASE_URL#69
LEW21 wants to merge 2 commits intodoismellburning:masterfrom
LEW21:patch-3

Conversation

@LEW21
Copy link
Contributor

@LEW21 LEW21 commented May 28, 2017

Django is unusable with in-memory SQLite, because there is no way to run both migrate and runserver on the same one. It's better to provide a default that's usable (and usually perfect) on development environments.

LEW21 added 2 commits May 28, 2017 22:57
Django is unusable with in-memory SQLite, because there is no way to run both migrate and runserver on the same one. It's better to provide a default that's usable (and usually perfect) on development environments.
@jdelic
Copy link
Collaborator

jdelic commented May 29, 2017

Iirc, the original reason for using sqlite://:memory: as the default is that it is the Django default for unit tests, thus making running unit tests with the Django test runner possible with d12f.

In my opinion django12factor should not mandate a physical database. In fact, it should be possible to use Django with d12f without using any database at all (yes, this means not relying on most of django.contrib, but there are valid use cases).

@LEW21
Copy link
Contributor Author

LEW21 commented May 29, 2017

"When using SQLite, the tests will use an in-memory database by default" (from the docs)

This will happen even if the default database is set to a on-disk SQLite database.

"In my opinion django12factor should not mandate a physical database. In fact, it should be possible to use Django with d12f without using any database at all (yes, this means not relying on most of django.contrib, but there are valid use cases)."

I don't think the DATABASES setting will get used at all if the user is not using any database-related things.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants