Topic: game scheduling module
trimard![]() Topic Opener |
Posted at: 2017-08-22, 12:07
Cool ![]() ![]() |
GunChleoc![]() |
Posted at: 2017-08-23, 16:24
I just stumbled upon this open bug - might be an idea for solving the time zones issue: https://bugs.launchpad.net/widelands-website/+bug/1649073 Busy indexing nil values ![]() ![]() |
kaputtnik![]() |
Posted at: 2017-08-23, 22:36
Timezone handling is quite complicated...
May you could provide some of the implementation details? Or provide a branch on launchpad? Fight simulator for Widelands: ![]() ![]() |
trimard![]() Topic Opener |
Posted at: 2017-08-23, 23:52
Gunscheoc Mhh I m not sure it would change much for me. I don t use django a lot for the logic. User.wlprofile.time_zone seems good enough this module. But maybe my implémentation isn t right @Kaputnik Yes good idea! I showed it to my brother and he told me to make some change in the db. If some other major changes are needed i guess it would be better to have your advices too. i ll send tomorow or the day after. I want to make good explanations with it. ![]() ![]() |
trimard![]() Topic Opener |
Posted at: 2017-08-24, 20:35
So here is the... dirty thing... https://code.launchpad.net/~trimardio/widelands-website/scheduling How I implemented that: js create a new date for each of the selected date by the users. In these the user can choose the hours that he want. I store the information as a dict { date1: hours_as_strings, date2: hours_as_strings, ...} This information storage is globally kept in the whole module and that is on that part that I think I should make the most changes. on click of validate js create a form in which the dates and hours are put inside. This sends a request to the server. The server store the dict as I described them already, simply adding the name of the user. The server sends as a response the users that are available at those time with the hours at which they are available (not working right now because I broke things ahead) ![]() ![]() |
kaputtnik![]() |
Posted at: 2017-08-24, 22:10
I think the general approach is good Here's how it looks like for me: The calendar is a bit fuzzy. I have to look into the code right now.... could take some time. Fight simulator for Widelands: ![]() ![]() |
kaputtnik![]() |
Posted at: 2017-08-24, 22:20
Forgot: Please re-add the files to your branch:
Otherwise they will be omitted when merging into trunk. Fight simulator for Widelands: ![]() ![]() |
trimard![]() Topic Opener |
Posted at: 2017-08-25, 18:44
Thanks! The calandar is a bit fuzzy? What is the problem you think? Yes I'll add the samples in the next commits. But I'm not rushing, there still needs work before the final push ![]() ![]() |
GunChleoc![]() |
Posted at: 2017-08-26, 08:55
Fuzzyness usually results from scaling something - is the calendar using images for anything? It would also be good to give it the dark background and white text color. Busy indexing nil values ![]() ![]() |
kaputtnik![]() |
Posted at: 2017-08-26, 11:52
Maybe remove the text-shadow from the datepicker and use other colors: normal dates=gray, availabale dates=black, chosen date=green? Just an idea You can look into the python datetime library for timezone related things. See also the setting TIME_ZONE in settings.py Disclaimer: I do currently most of the work for the website, but i am far away from being a django/javascript/html/css specialist
Fight simulator for Widelands: ![]() ![]() |