prije dodavanja aplikacije
This commit is contained in:
parent
b6454c5f78
commit
b89fde9c92
Binary file not shown.
@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2024-01-08 14:35
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('plovidba_aplikacija', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='objektsigurnosti',
|
||||||
|
name='lat',
|
||||||
|
field=models.FloatField(default=0.0),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='objektsigurnosti',
|
||||||
|
name='lon',
|
||||||
|
field=models.FloatField(default=0.0),
|
||||||
|
),
|
||||||
|
]
|
||||||
Binary file not shown.
@ -6,6 +6,7 @@ from django.db import models
|
|||||||
from django.contrib.gis.db import models
|
from django.contrib.gis.db import models
|
||||||
|
|
||||||
class ObjektSigurnosti(models.Model):
|
class ObjektSigurnosti(models.Model):
|
||||||
lokacija = models.PointField()
|
lat = models.FloatField(default=0.0)
|
||||||
|
lon = models.FloatField(default=0.0)
|
||||||
naziv = models.CharField(max_length=255)
|
naziv = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -17,7 +17,8 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
|
|
||||||
# dodano
|
# dodano
|
||||||
import os
|
import os
|
||||||
import GDAL
|
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__)))
|
||||||
|
|
||||||
@ -53,6 +54,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'plovidba_aplikacija',
|
'plovidba_aplikacija',
|
||||||
|
'django.contrib.gis',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@ -91,7 +93,7 @@ WSGI_APPLICATION = 'plovidba_projekt.wsgi.application'
|
|||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
'ENGINE': 'django.db.backends.postgresql',
|
||||||
'NAME': 'plovidba_db',
|
'NAME': 'plovidba_db',
|
||||||
'USER': 'postgres',
|
'USER': 'postgres',
|
||||||
'PASSWORD': 'postgres',
|
'PASSWORD': 'postgres',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user