feat: implement Immich integration with CRUD API, add serializer, and enhance frontend components

This commit is contained in:
Sean Morley
2025-01-02 13:34:51 -05:00
parent 5d12d103fc
commit cee9f16cf5
12 changed files with 317 additions and 8 deletions

View File

@@ -1,12 +1,15 @@
from django.db import models
from django.contrib.auth import get_user_model
import uuid
User = get_user_model()
class ImmichIntegration(models.Model):
server_url = models.CharField(max_length=255)
api_key = models.CharField(max_length=255)
user = models.OneToOneField(User, on_delete=models.CASCADE)
user = models.ForeignKey(
User, on_delete=models.CASCADE)
id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
def __str__(self):
return self.user.username + ' - ' + self.server_url