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
|
||||
|
||||
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)
|
||||
|
||||
|
||||
Binary file not shown.
@ -17,7 +17,8 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
# dodano
|
||||
import os
|
||||
import GDAL
|
||||
from osgeo import gdal
|
||||
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@ -53,6 +54,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.staticfiles',
|
||||
'rest_framework',
|
||||
'plovidba_aplikacija',
|
||||
'django.contrib.gis',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@ -91,7 +93,7 @@ WSGI_APPLICATION = 'plovidba_projekt.wsgi.application'
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': 'plovidba_db',
|
||||
'USER': 'postgres',
|
||||
'PASSWORD': 'postgres',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user