Using sqlite as database for developing Weblate #11159
-
I know that docs recommend Postgres or Docker, but it does require a bit of additional set-up. I started with these docs https://docs.weblate.org/en/latest/contributing/start.html This is the relevant bit I changed in DATABASES = {
"default": {
# Use "postgresql" or "mysql".
"ENGINE": "django.db.backends.sqlite3",
"NAME": f"{os.getcwd()}/db.sqlite3",
# Database user.
"USER": "weblate",
# Name of role to alter to set parameters in PostgreSQL,
# use in case role name is different than user used for authentication.
# "ALTER_ROLE": "weblate",
# Database password.
"PASSWORD": "",
# Set to empty string for localhost.
"HOST": "127.0.0.1",
# Set to empty string for default.
"PORT": "",
# Customizations for databases.
"OPTIONS": {
# In case of using an older MySQL server,
# which has MyISAM as a default storage
# "init_command": "SET storage_engine=INNODB",
# Uncomment for MySQL older than 5.7:
# "init_command": "SET sql_mode='STRICT_TRANS_TABLES'",
# Set emoji capable charset for MySQL:
# "charset": "utf8mb4",
# Change connection timeout in case you get MySQL gone away error:
# "connect_timeout": 28800,
},
# Persistent connections
"CONN_MAX_AGE": None,
"CONN_HEALTH_CHECKS": True,
# Disable server-side cursors, might be needed with pgbouncer
"DISABLE_SERVER_SIDE_CURSORS": False,
}
} And when I run |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
oh, actually, I think using SQLite is even unrelated, it seems the problem was with DATA_DIR, now after changing it to "use this for development purposes" it doesn't trigger this error |
Beta Was this translation helpful? Give feedback.
-
oh, I see, I got to actually running migrations to get "unsupported database: sqlite", well, I guess this is it 😅 |
Beta Was this translation helpful? Give feedback.
oh, I see, I got to actually running migrations to get "unsupported database: sqlite", well, I guess this is it 😅