Добавил GeoDjango

This commit is contained in:
zakhy 2025-03-26 15:29:22 +07:00
parent 8ead1f924a
commit f6083c8a35
6 changed files with 27 additions and 3 deletions

View File

@ -171,6 +171,24 @@ mccabe = ">=0.7.0,<0.8.0"
pycodestyle = ">=2.12.0,<2.13.0" pycodestyle = ">=2.12.0,<2.13.0"
pyflakes = ">=3.2.0,<3.3.0" pyflakes = ">=3.2.0,<3.3.0"
[[package]]
name = "GDAL"
version = "3.10.1"
description = "GDAL: Geospatial Data Abstraction Library"
optional = false
python-versions = ">=3.8.0"
groups = ["dev"]
files = [
{file = "GDAL-3.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:f378914a7119d0a86d782be31af472ab769aa710876fdcc62668489afbc64f72"},
]
[package.extras]
numpy = ["numpy (>1.0.0)"]
[package.source]
type = "file"
url = "gdal/GDAL-3.10.1-cp310-cp310-win_amd64.whl"
[[package]] [[package]]
name = "gunicorn" name = "gunicorn"
version = "23.0.0" version = "23.0.0"
@ -719,4 +737,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess
[metadata] [metadata]
lock-version = "2.1" lock-version = "2.1"
python-versions = "^3.10" python-versions = "^3.10"
content-hash = "3664555037e5a6ee06732fdfa0fc6599e42c29deda125177389f64f883c122ca" content-hash = "9dfb6ac5fef6391274e0f44573e9bf742774ec88f04c764773e6ac388ddff90e"

View File

@ -6,6 +6,7 @@ INSTALLED_APPS = [
"django.contrib.sessions", "django.contrib.sessions",
"django.contrib.messages", "django.contrib.messages",
"django.contrib.staticfiles", "django.contrib.staticfiles",
"django.contrib.gis",
"apps.main.apps.MainConfig", # Главное "apps.main.apps.MainConfig", # Главное
"apps.workers.apps.WorkersConfig", # Сотрудники "apps.workers.apps.WorkersConfig", # Сотрудники
"apps.street_pos.apps.StreetPosConfig", # Позиционирование улица "apps.street_pos.apps.StreetPosConfig", # Позиционирование улица

View File

@ -71,3 +71,6 @@ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
VERSION_SETTING_NAME = "APP_VERSION" VERSION_SETTING_NAME = "APP_VERSION"
GET_VERSION_FROM_DB_FUNCTION = "apps.versioning.version.get_version_from_db" GET_VERSION_FROM_DB_FUNCTION = "apps.versioning.version.get_version_from_db"
ON_UPDATE_FUNCTION = "apps.versioning.version.print_update" ON_UPDATE_FUNCTION = "apps.versioning.version.print_update"
GDAL_LIBRARY_PATH = os.getenv("GDAL_LIBRARY_PATH")
GEOS_LIBRARY_PATH = os.getenv("GEOS_LIBRARY_PATH")

View File

@ -3,7 +3,7 @@ DEBUG = True
SECRET_KEY = "django-debug-key" SECRET_KEY = "django-debug-key"
DATABASES = { DATABASES = {
"default": { "default": {
"ENGINE": "django.db.backends.postgresql_psycopg2", "ENGINE": "django.contrib.gis.db.backends.postgis",
"HOST": "localhost", "HOST": "localhost",
"PORT": "5432", "PORT": "5432",
"NAME": "mfss-positioning", "NAME": "mfss-positioning",

View File

@ -4,7 +4,7 @@ SECRET_KEY = os.environ.get("SECRET_KEY", "random-secret-key")
DEBUG = False DEBUG = False
DATABASES = { DATABASES = {
"default": { "default": {
"ENGINE": "django.db.backends.postgresql_psycopg2", "ENGINE": "django.contrib.gis.db.backends.postgis",
"HOST": os.environ.get("POSTGRES_HOST", ""), "HOST": os.environ.get("POSTGRES_HOST", ""),
"PORT": os.environ.get("POSTGRES_PORT", ""), "PORT": os.environ.get("POSTGRES_PORT", ""),
"NAME": os.environ.get("POSTGRES_DB", ""), "NAME": os.environ.get("POSTGRES_DB", ""),

View File

@ -15,7 +15,9 @@ colorama = "^0.4.6"
versioning = { git = "https://git.cybercode.pro/zakhy/versioning.git", branch = "django-4.2" } versioning = { git = "https://git.cybercode.pro/zakhy/versioning.git", branch = "django-4.2" }
python-dotenv = "^1.0.1" python-dotenv = "^1.0.1"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
gdal = {path = "gdal/GDAL-3.10.1-cp310-cp310-win_amd64.whl"}
setuptools = "^75.8.2" setuptools = "^75.8.2"
black = "^25.1.0" black = "^25.1.0"
flake8 = "^7.1.2" flake8 = "^7.1.2"