obrisani lat i lon
This commit is contained in:
parent
1b80bda3d5
commit
7d2df70d53
Binary file not shown.
Binary file not shown.
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2024-01-09 08:13
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('plovidba_aplikacija', '0002_remove_objektsigurnosti_lokacija_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='objektsigurnosti',
|
||||||
|
name='nazi1v',
|
||||||
|
field=models.CharField(default='test', max_length=255),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2024-01-09 08:13
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('plovidba_aplikacija', '0003_objektsigurnosti_nazi1v'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='objektsigurnosti',
|
||||||
|
name='nazi1v',
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2024-01-09 08:16
|
||||||
|
|
||||||
|
import django.contrib.gis.db.models.fields
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('plovidba_aplikacija', '0004_remove_objektsigurnosti_nazi1v'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='objektsigurnosti',
|
||||||
|
name='lokacija',
|
||||||
|
field=django.contrib.gis.db.models.fields.PointField(null=True, srid=4326),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2024-01-09 08:16
|
||||||
|
|
||||||
|
import django.contrib.gis.db.models.fields
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('plovidba_aplikacija', '0005_objektsigurnosti_lokacija'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='objektsigurnosti',
|
||||||
|
name='lokacija',
|
||||||
|
field=django.contrib.gis.db.models.fields.PointField(null=True, srid=3765),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2024-01-09 08:41
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('plovidba_aplikacija', '0006_alter_objektsigurnosti_lokacija'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='objektsigurnosti',
|
||||||
|
name='lat',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='objektsigurnosti',
|
||||||
|
name='lon',
|
||||||
|
),
|
||||||
|
]
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,9 +1,9 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.contrib.gis.db import models
|
||||||
|
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
|
|
||||||
class ObjektSigurnosti(models.Model):
|
class ObjektSigurnosti(models.Model):
|
||||||
lat = models.FloatField(default=0.0)
|
|
||||||
lon = models.FloatField(default=0.0)
|
|
||||||
naziv = models.CharField(max_length=255)
|
naziv = models.CharField(max_length=255)
|
||||||
|
lokacija = models.PointField(null=True, srid=3765)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -22,14 +22,6 @@ from osgeo import gdal
|
|||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
# use this if setting up on Windows 10 with GDAL installed from OSGeo4W using defaults
|
|
||||||
if os.name == 'nt':
|
|
||||||
VIRTUAL_ENV_BASE = os.environ['VIRTUAL_ENV']
|
|
||||||
os.environ['PATH'] = os.path.join(VIRTUAL_ENV_BASE, r'.\Lib\site-packages\osgeo') + ';' + os.environ['PATH']
|
|
||||||
os.environ['PROJ_LIB'] = os.path.join(VIRTUAL_ENV_BASE, r'.\Lib\site-packages\osgeo\data\proj') + ';' + os.environ['PATH']
|
|
||||||
|
|
||||||
GDAL_LIBRARY_PATH = r'C:\Users\Student1\Desktop\plovidba\myenv\djangoenv\Lib\site-packages\osgeo\gdal304.dll'
|
|
||||||
|
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
|
||||||
@ -52,9 +44,10 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
'django.contrib.gis',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'plovidba_aplikacija',
|
'plovidba_aplikacija',
|
||||||
'django.contrib.gis',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@ -93,7 +86,7 @@ WSGI_APPLICATION = 'plovidba_projekt.wsgi.application'
|
|||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.postgresql',
|
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
||||||
'NAME': 'plovidba_db',
|
'NAME': 'plovidba_db',
|
||||||
'USER': 'postgres',
|
'USER': 'postgres',
|
||||||
'PASSWORD': 'postgres',
|
'PASSWORD': 'postgres',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user