#28499: makemigrations fails on model with geometry field when the geo database
is
not the defaul one
------------------------+--------------------------------------
Reporter: Kaveh | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------+--------------------------------------
Comment (by Kaveh):
Hi Simon, I just tried with Django 1.11 and everything works fine there.
Unfortunately I'm stuck with Django 1.8.14 right now and upgrade is not an
option for me.
Here's the full traceback:
{{{
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/core/management/__init__.py", line 354, in
execute_from_command_line
utility.execute()
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/core/management/base.py", line 444, in execute
self.check()
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/core/management/base.py", line 482, in check
include_deployment_checks=include_deployment_checks,
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/core/checks/model_checks.py", line 28, in check_all_models
errors.extend(model.check(**kwargs))
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/db/models/base.py", line 1205, in check
errors.extend(cls._check_fields(**kwargs))
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/db/models/base.py", line 1282, in _check_fields
errors.extend(field.check(**kwargs))
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/db/models/fields/__init__.py", line 207, in check
errors.extend(self._check_backend_specific_checks(**kwargs))
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/db/models/fields/__init__.py", line 306, in
_check_backend_specific_checks
return connection.validation.check_field(self, **kwargs)
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/db/backends/mysql/validation.py", line 18, in check_field
field_type = field.db_type(connection)
File "/home/user/sandbox/venv/local/lib/python2.7/site-
packages/django/contrib/gis/db/models/fields.py", line 247, in db_type
return connection.ops.geo_db_type(self)
AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type'
}}}
Replying to [comment:1 Simon Charette]:
> Hello Kaveh,
>
> Did you reproduce against 1.11 as well? Would it be possible for you to
provide the full traceback of the `AttributeError`?
--
Ticket URL: <https://code.djangoproject.com/ticket/28499#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.801867ed11e029fafc31245922fdd151%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.