1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 12:59:36 +02:00

feat: Update Visit model to use DateTimeField for start and end dates, and enhance AdventureModal with datetime-local inputs

This commit is contained in:
Sean Morley 2025-03-18 14:04:31 -04:00
parent 6f720a154f
commit 9fd2a142cb
6 changed files with 152 additions and 35 deletions

View file

@ -76,8 +76,8 @@ User = get_user_model()
class Visit(models.Model):
id = models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True)
adventure = models.ForeignKey('Adventure', on_delete=models.CASCADE, related_name='visits')
start_date = models.DateField(null=True, blank=True)
end_date = models.DateField(null=True, blank=True)
start_date = models.DateTimeField(null=True, blank=True)
end_date = models.DateTimeField(null=True, blank=True)
notes = models.TextField(blank=True, null=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)