These are chat archives for django/django

6th
Oct 2017
John
@flyboy1565
Oct 06 2017 07:04
hello to all
I need some help, I'm trying to make a team_member_scheduling app.
I have
class Shift(models.Model):
     team_member = models.ForeignKeyField(User)
     schedule_date = models.DateField()
     start = models.DateTimeField()
     end = models.DateTimeField()
John
@flyboy1565
Oct 06 2017 07:09
I want to write a template that will show a weeks schedule, but will also allow multiple shifts in the same day.
something like
User    | Monday | Tuesday |
John  | 7am-4pm | 7am-12pm 3pm-6pm |
Any help would be great
Luke-VideoLibre
@LukeVideo
Oct 06 2017 13:58
@flyboy1565 I'm not sure how to handle that but you could multiply shifts and have two the same day... Or add a breakstart and breakend field that can be empty and then you can check if you have a break and change your templating accordingly.
@annshress 2-hair-car isn't in type3 field and i guess contains has to be exact reference to argument.
Luke-VideoLibre
@LukeVideo
Oct 06 2017 14:08
Or word has to correspond. For example 'fast cars', slow cars' and 'big cars' would be returned for search_fieldstype3contains='cars' but 'my car' would fail. Please correct me if i'm wrong anybody.