AttributeError: 'DatabaseWrapper' object has no attribute 'is_mariadb'
See original GitHub issueWhen i am running the makemigration command for this model
from __future__ import unicode_literals
from django.db import models
from django_mysql.models import JSONField
class Owners(models.Model):
name = models.CharField(max_length=255)
url = models.CharField(max_length=128, null=True, blank=True)
email = models.EmailField(null=True, blank=True)
phone = models.CharField(max_length=32, null=True, blank=True)
address = models.CharField(max_length=128, null=True, blank=True)
country = models.CharField(max_length=32, null=True, blank=True)
description = models.TextField(null=True, blank=True)
class Brands(models.Model):
name = models.CharField(max_length=255)
owner = models.ForeignKey(Owners, null=True, blank=True)
url = models.CharField(max_length=128, null=True, blank=True)
description = models.TextField(null=True, blank=True)
tags = JSONField(null=True, blank=True)
I am getting that logs
File "/home/sanyam/Project/groceryfy/venv/local/lib/python2.7/site-packages/django_mysql/models/fields/json.py", line 65, in _check_mysql_version
(conn.is_mariadb or conn.mysql_version < (5, 7))
AttributeError: 'DatabaseWrapper' object has no attribute 'is_mariadb'
Summary: summarize the issue here
If this is a bug, please fill in the below, else delete
Django Version: e.g. Django 1.9
Database and version used: e.g. MySQL 5.7
Version: e.g. Django-MySQL 1.1.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
AttributeError: 'DatabaseWrapper' object has no attribute ...
My issue was that I had used django.db.backends.postgresql_psycopg2 instead of django_tenants.postgresql_backend for my database engine as ...
Read more >'db.backends.dummy.base.DatabaseWrapper' object has no ...
I am getting a AttributeError: 'DatabaseWrapper' object has no attribute 'Database' exception, while trying to setup/use py.test with Django.
Read more >'DatabaseWrapper' object has no attribute 'Database' – iTecNote
Python – AttributeError: 'DatabaseWrapper' object has no attribute 'Database'. djangopython. Version numbers are Django 1.6, Python 3.3.2 and Mac OS X 10.9.
Read more >django+mysql='DatabaseWrapper' object has no attribute ...
Coding example for the question django+mysql='DatabaseWrapper' object has no attribute 'Database' error-django.
Read more >'DatabaseWrapper' object has no attribute 'pattern_ops ...
pattern = connection.pattern_ops[self.lookup_name].format(connection.pattern_esc). AttributeError: 'DatabaseWrapper' object has no attribute 'pattern_ops'.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suspect you don’t have
django_mysql
in yourINSTALLED_APPS
, as previously reported and will be fixed in #323 .Refer to https://django-mysql.readthedocs.io/en/latest/installation.html