foad-heidari / dj-booking

free and complete booking package for Django
Other
59 stars 29 forks source link

Bug - User_id #30

Open ezspot opened 2 years ago

ezspot commented 2 years ago

Not sure what's the plan with this field, but it's empty. Just remove? Or

foad-heidari commented 2 years ago

where is that field?

can you show the file name and the locations?

ezspot commented 2 years ago

Found it in db.sqlite3 image

foad-heidari commented 2 years ago

yes, there is a ForeignKey to the user,

so if the user already have an account, we link the appointment to the user

class Booking(models.Model):
    user = models.ForeignKey(settings.AUTH_USER_MODEL,
                             on_delete=models.CASCADE, blank=True, null=True)
    date = models.DateField()
    ...
ezspot commented 2 years ago

But the user is not defined everywhere else? So what user are we talking about.

foad-heidari commented 2 years ago

Django user modal.

we need to assign the appointment to the user in the create booking view