[issue30095] HTMLCalendar allow custom classes

2017-06-06 Thread Walter Dörwald
Walter Dörwald added the comment: Closing the issue. The patch has been merged. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue30095] HTMLCalendar allow custom classes

2017-06-06 Thread Walter Dörwald
Walter Dörwald added the comment: New changeset 8b7a4cc40e9b2f34da94efb75b158da762624015 by Walter Dörwald (Oz N Tiram) in branch 'master': bpo-30095: Make CSS classes used by calendar.HTMLCalendar customizable (GH-1439) https://github.com/python/cpython/commit/8b7a4cc40e9b2f34da94efb75b158da76

[issue30095] HTMLCalendar allow custom classes

2017-06-01 Thread Oz Tiram
Oz Tiram added the comment: @Walter, I fixed the issues your raised, and also solved the merge conflict in What's New. -- ___ Python tracker ___

[issue30095] HTMLCalendar allow custom classes

2017-06-01 Thread Walter Dörwald
Walter Dörwald added the comment: See comments on the pull request. Also it seems that currently the pull request can't be merged because of merge conflicts. -- ___ Python tracker _

[issue30095] HTMLCalendar allow custom classes

2017-05-31 Thread Walter Dörwald
Walter Dörwald added the comment: See my comments on the pull request: https://github.com/python/cpython/pull/1439 After you address those, IMHO this is ready to be merged. -- ___ Python tracker __

[issue30095] HTMLCalendar allow custom classes

2017-05-05 Thread Walter Dörwald
Walter Dörwald added the comment: See comments on Github -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue30095] HTMLCalendar allow custom classes

2017-05-03 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review versions: +Python 3.7 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue30095] HTMLCalendar allow custom classes

2017-05-03 Thread Oz Tiram
Oz Tiram added the comment: @Walter, I implemented your suggestions plus the obvious tasks of adding tests and documentation. Would be happy to hear your feedback. -- ___ Python tracker _

[issue30095] HTMLCalendar allow custom classes

2017-05-03 Thread Oz Tiram
Changes by Oz Tiram : -- pull_requests: +1537 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue30095] HTMLCalendar allow custom classes

2017-04-24 Thread Oz Tiram
Oz Tiram added the comment: Apparently, I forgot to push the second branch. It is now pushed. I renamed the class attribute names on the v1 branch. I still need to do the following: - Add docs - Fix existing tests and add new tests demonstrating the usage of the new attributes. --

[issue30095] HTMLCalendar allow custom classes

2017-04-24 Thread Oz Tiram
Oz Tiram added the comment: @Walter, I agree with you about consistent naming. Personally, I would prefer to name all the variables "styles". But I preferred not to break past compatibility too. So I guess we are stuck for a while with "classes". I will rename the variables. As for documentin

[issue30095] HTMLCalendar allow custom classes

2017-04-24 Thread Walter Dörwald
Walter Dörwald added the comment: The second link is a 404. For the v1 patch: The variable names are a bit inconsistent: The first uses "classes" all others use "styles". This should be consistent within itself and with the existing code, i.e. "classes" should be used. Also each class attrib

[issue30095] HTMLCalendar allow custom classes

2017-04-23 Thread Oz Tiram
Oz Tiram added the comment: @Walter, I implemented two possible solutions. Chronologically speaking V2 was implemented before V1, but it's a bit über-smart and might surprise it's users requiring the class attributes to be some kind of iterable. The first version is my current preferred solut

[issue30095] HTMLCalendar allow custom classes

2017-04-19 Thread Walter Dörwald
Walter Dörwald added the comment: OK, go ahead. I'm looking forward to what you come up with. -- ___ Python tracker ___ ___ Python-bug

[issue30095] HTMLCalendar allow custom classes

2017-04-19 Thread Oz Tiram
Oz Tiram added the comment: ... Using class attributes would nice, also considering that the days CSS classes are defined as class attributes. I meant to write : Using class attributes would be nicer, also considering that the days CSS classes are defined as class attributes. -- ___

[issue30095] HTMLCalendar allow custom classes

2017-04-19 Thread Oz Tiram
Oz Tiram added the comment: @doerwalter, exactly. I found myself overwriting the relevant methods too many times. I usually did something like this: class WorkCalendar(HTMLCalendar): def formatmonthname(self, theyear, themonth, withyear=True, style=r'class=

[issue30095] HTMLCalendar allow custom classes

2017-04-19 Thread Walter Dörwald
Walter Dörwald added the comment: IMHO this could all be done by overwriting the relevant methods. But this might be overkill. I think a solution might be to move the CSS classes into class attributes of HTMLCalendar. Customizing the CSS classes would then be done by subclassing HTMLCalendar

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Oz Tiram
Oz Tiram added the comment: Of course I can, but I can't add multiple css classes, and I forced to have the same class for both the title of the month and the body of the month. -- ___ Python tracker __

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Can't you override the `.month` css class and customize the style that way? -- nosy: +Mariatta ___ Python tracker ___ _

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Oz Tiram
New submission from Oz Tiram: At the moment methods like HTMLCalendar.formatmonthname and HTMLCalendar.formatmonth have hard coded name 'month'. This class is pretty helpful as a good start, but if you want to customize the styles it's not helpful. I think it would be helpful for others too, i