-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported GroundObject model from Go (#52)
* Ported GroundObject model from Go * Added endpoints for GroundObject * Almost done with tests, need some help * Urls import reordering * Finished endpoint fixes * Uncommitted Files Added * Uncommitted Files Added * lint: black * refactor: rename images to vision --------- Co-authored-by: 21chanas3 <[email protected]>
- Loading branch information
Showing
17 changed files
with
411 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ImagesConfig(AppConfig): | ||
class VisionConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "images" | ||
name = "vision" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# Generated by Django 5.1.2 on 2024-10-12 14:39 | ||
|
||
import uuid | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="GroundObject", | ||
fields=[ | ||
( | ||
"id", | ||
models.UUIDField( | ||
default=uuid.uuid4, | ||
editable=False, | ||
primary_key=True, | ||
serialize=False, | ||
unique=True, | ||
), | ||
), | ||
( | ||
"object_type", | ||
models.CharField( | ||
choices=[("standard", "Standard"), ("emergent", "Emergent")], | ||
default="standard", | ||
max_length=10, | ||
), | ||
), | ||
("lat", models.FloatField()), | ||
("long", models.FloatField()), | ||
( | ||
"shape", | ||
models.CharField( | ||
choices=[ | ||
("circle", "Circle"), | ||
("semicircle", "Semi-Circle"), | ||
("quartercircle", "Quarter-Circle"), | ||
("triangle", "Triangle"), | ||
("rectangle", "Rectangle"), | ||
("pentagon", "Pentagon"), | ||
("star", "Star"), | ||
("cross", "Cross"), | ||
], | ||
default="circle", | ||
max_length=15, | ||
), | ||
), | ||
( | ||
"color", | ||
models.CharField( | ||
choices=[ | ||
("black", "Black"), | ||
("red", "Red"), | ||
("blue", "Blue"), | ||
("green", "Green"), | ||
("purple", "Purple"), | ||
("brown", "Brown"), | ||
("orange", "Orange"), | ||
], | ||
default="black", | ||
max_length=10, | ||
), | ||
), | ||
("text", models.CharField(max_length=100)), | ||
( | ||
"text_color", | ||
models.CharField( | ||
choices=[ | ||
("black", "Black"), | ||
("red", "Red"), | ||
("blue", "Blue"), | ||
("green", "Green"), | ||
("purple", "Purple"), | ||
("brown", "Brown"), | ||
("orange", "Orange"), | ||
], | ||
default="black", | ||
max_length=10, | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Ground Object", | ||
"verbose_name_plural": "Ground Objects", | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name="Image", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("image", models.ImageField(upload_to="files/")), | ||
("title", models.CharField(max_length=100)), | ||
( | ||
"image_type", | ||
models.CharField( | ||
choices=[("visible", "Visible"), ("thermal", "Thermal")], | ||
default="visible", | ||
max_length=20, | ||
), | ||
), | ||
("taken_at", models.DateTimeField()), | ||
("longitude", models.FloatField(null=True)), | ||
("latitude", models.FloatField(null=True)), | ||
("altitude", models.FloatField(null=True)), | ||
], | ||
), | ||
] |
File renamed without changes.
Oops, something went wrong.