This repository has been archived on 2026-10-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
smugfolio-server/smugfolioapi/models/images.py
T
2022-03-15 14:41:34 -05:00

11 lines
564 B
Python

from django.db import models
class Images(models.Model):
file_name = models.CharField(max_length=1024)
file_path = models.CharField(max_length=1024)
album_id = models.IntegerField(default=0)
smug_user_id = models.ForeignKey("Smug_Users", on_delete=models.CASCADE)
upload_date = models.DateTimeField(auto_now_add=True)
# I believe that auto_now_add is the correct syntax. If I'm understanding this correctly, it only creates a timestamp when the object is first created.
# https://www.geeksforgeeks.org/datetimefield-django-models/