hub-ology / video_village

Video Village project
MIT License
1 stars 5 forks source link

Window model should have a unique window number field (1-52) #13

Open BrianPainter opened 8 years ago

BrianPainter commented 8 years ago

The window model needs a window_number field

janga1997 commented 7 years ago

@BrianPainter What is supposed to be the default value of window_number? I found another window_number variable defined in pis/views.py , where

        data = request.data

        window_number = data.get('window')

But I'm supposing that's not the case here?

BrianPainter commented 7 years ago

@janga1997 The window_number should be a user defined field on the Window model to make for easy labeling/identification of the windows. In the above code, the window_number is referencing the id number from the window model. This works, but ends up not matching the numbers that we would prefer to use for the windows if any changes are made to the database (Delete a window object, and now that id number is not re-used). Does that make sense?