Trying to figure out how to use GeoDjango, with these instructions:
https://code-examples.net/ru/docs/django~2.0/ref/c...
After creating the model and executing the python manage.py sqlmigrate world 0001 command:
I'm watching the error:
AttributeError:'DatabaseOperations'object has no attribute'geo_db_type'
Most likely this is due to the fact that I could not establish the spatial database SpatiaLite...
I don’t understand how it is installed on Windows, I go to the site: https://www.gaia-gis .it/gaia-sins /,
followed the links: www.gaia-gis.it/gaia-sins/windows-bin-amd64
downloaded from there file: spatialite.exe

And what is next to him to do is not clear:(Please tell me what is the reason for this error and how to configure the spatial database to work with GeoDjango?

2 Answers 2

SpatiaLite needed to support sqlite
I recommend using Postgres + PostGis
  • The fact is that apart from sqlite I did not work with other databases, it would be doubly difficult :(
    Postgres + PostGis

    And what is the advantage of such a bundle?
    – Thoughtful Toucan Dec 7 '18 at 05:28
  • Postgers compared to sqlite is like MS SQL compared to Access
    More powerful and rich in all sorts of features base
    – Gentle Gnu Dec 7 '18 at 09:44
  • Gentle Gnu, And yet could you give me an example of what kind of features do not be features? – Thoughtful Toucan Jan 22 '19 at 08:30
First, you need to master Linux.This is just a minimal base if you plan to seriously engage in web development.
Secondly, PostgreSQL better copes with spatial data(I myself did not even consider alternatives).Here's a comprehensive guide to using PostgreSQL and PostGIS, then PostgeSQL how to install and how to connect PostGIS .
You also need to this.This is enough for Django to work with PostgreSQL.
  • And yet I would like to clarify a few points on your two points:
    1. Well, the fact that all manuals are mostly written for Linux is understandable, and what else in this case will be the benefits?
    2. When using PostgreSQL + Django, I don’t understand one thing, will I have to completely switch Django to PostgreSQL or the spatial database is always connected as a separate database and will be used only for GIS?
    3. I just wouldn’t want to fully switch to Linux, tell me if the solution is normal when I’ll use a virtual machine with Linux installed on it? Or are there other more convenient options?
    – Thoughtful Toucan Jan 22 '19 at 08:53
  • 1. Well, it is difficult at first, and then become familiar.
    2. There are several options. PostGIS is an extension, it is not put on the whole PostgeSQL, but only on the database of your choice. Therefore, theoretically, you can use 2 databases, one PostgreSQL + PostGIS for working with GIS data using using, and the default database can be MySQL. Well, the option is simpler, just use one PostgeSQL + PostGIS database.
    3. If you have Windows 10, then install from the Ubuntu Store and do not need any virtual locks, it is an adequate option.
    – Looney89 Jan 22 '19 at 13:39
  • 1. I am not afraid of Linux myself, I used to use Ubuntu as my main OS before. The fact is that the software that is planned to be used in conjunction with Django only works under Windows and a number of things flow from this, either rewrite the software to work under Linux, or use virtual machines, or try to run under Vendo :( and I am trying to figure out for myself whether it is possible to raise Django + OSM under Windows at all or is it not possible in principle? (without using virtual machines)
    2. At this point, again, the above mentioned software is corrupted because it works SQLite... On the other hand, I can use it separately from Django and receive data from SQLite with simple SQL queries. And in Django I fully switch to PostgeSQL + PostGIS, as far as I understand, I will not have problems with applications written for me by Django (under SQLite), because in django you can switch the database so to say"almost on hot":)
    3. Well I do not know. In the case of a virtual machine, it is possible to simply copy it to another machine, but with Ubuntu from the Microsoft store, this probably won't work? This is, as far as I understand, not a full-fledged Ubuntu?
    – Thoughtful Toucan Jan 22 '19 at 14:00