Nakon uredjivanja baze
This commit is contained in:
parent
b291d2e08f
commit
b6454c5f78
BIN
plovidba_aplikacija/__pycache__/__init__.cpython-38.pyc
Normal file
BIN
plovidba_aplikacija/__pycache__/__init__.cpython-38.pyc
Normal file
Binary file not shown.
BIN
plovidba_aplikacija/__pycache__/admin.cpython-38.pyc
Normal file
BIN
plovidba_aplikacija/__pycache__/admin.cpython-38.pyc
Normal file
Binary file not shown.
BIN
plovidba_aplikacija/__pycache__/apps.cpython-38.pyc
Normal file
BIN
plovidba_aplikacija/__pycache__/apps.cpython-38.pyc
Normal file
Binary file not shown.
BIN
plovidba_aplikacija/__pycache__/models.cpython-38.pyc
Normal file
BIN
plovidba_aplikacija/__pycache__/models.cpython-38.pyc
Normal file
Binary file not shown.
23
plovidba_aplikacija/migrations/0001_initial.py
Normal file
23
plovidba_aplikacija/migrations/0001_initial.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2024-01-08 12:23
|
||||||
|
|
||||||
|
import django.contrib.gis.db.models.fields
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ObjektSigurnosti',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('lokacija', django.contrib.gis.db.models.fields.PointField(srid=4326)),
|
||||||
|
('naziv', models.CharField(max_length=255)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
Binary file not shown.
Binary file not shown.
@ -9,4 +9,3 @@ class ObjektSigurnosti(models.Model):
|
|||||||
lokacija = models.PointField()
|
lokacija = models.PointField()
|
||||||
naziv = models.CharField(max_length=255)
|
naziv = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,3 +9,4 @@ from .serializers import ObjektSigurnostiSerializer
|
|||||||
class ObjektSigurnostiViewSet(viewsets.ModelViewSet):
|
class ObjektSigurnostiViewSet(viewsets.ModelViewSet):
|
||||||
queryset = ObjektSigurnosti.objects.all()
|
queryset = ObjektSigurnosti.objects.all()
|
||||||
serializer_class = ObjektSigurnostiSerializer
|
serializer_class = ObjektSigurnostiSerializer
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
BIN
plovidba_projekt/__pycache__/wsgi.cpython-38.pyc
Normal file
BIN
plovidba_projekt/__pycache__/wsgi.cpython-38.pyc
Normal file
Binary file not shown.
@ -17,6 +17,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
|
|
||||||
# dodano
|
# dodano
|
||||||
import os
|
import os
|
||||||
|
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__)))
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'plovidba_projekt',
|
'plovidba_aplikacija',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@ -93,7 +94,7 @@ DATABASES = {
|
|||||||
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
||||||
'NAME': 'plovidba_db',
|
'NAME': 'plovidba_db',
|
||||||
'USER': 'postgres',
|
'USER': 'postgres',
|
||||||
'PASSWORD': 'test123',
|
'PASSWORD': 'postgres',
|
||||||
'HOST': 'localhost',
|
'HOST': 'localhost',
|
||||||
'PORT': '5432',
|
'PORT': '5432',
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user