init commit

This commit is contained in:
2025-11-08 19:52:13 +01:00
parent eb3ef908a0
commit 174af90eb4
332 changed files with 63397 additions and 0 deletions

25
base/models.py Normal file
View File

@@ -0,0 +1,25 @@
from django.db import models
# Create your models here.
class Patient(models.Model):
def __str__(self):
return self.name
name = models.CharField(max_length=50)
nationalID = models.CharField(max_length=20)
image = models.ImageField(upload_to='static/uploads/')
description = models.CharField(max_length=500)
created_at = models.DateTimeField(auto_now_add=True)
class Detection(models.Model):
def __str__(self):
return self.patient.name
patient = models.ForeignKey(Patient, on_delete=models.CASCADE)
dImage = models.ImageField(upload_to='static/uploads/detections/')