Skip to content

Instantly share code, notes, and snippets.

skabbit

Block or report user

Report or block skabbit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@skabbit
skabbit / settings.py
Last active Aug 16, 2019
Django+MySQL settings for fixing "incompatible with sql_mode=ONLY_FULL_GROUP_BY"
View settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
...
'OPTIONS': {
'init_command': "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));"
}
}
}
You can’t perform that action at this time.