Conversation
| def getEventTypes(self): | ||
| types = self.calendar.getCalendarTypes() | ||
| return ''.join(map(lambda x: 'Type={0}&'.format(self.url_quote_plus(x)), types)) | ||
| return 'Type=Event&' |
Member
There was a problem hiding this comment.
@rodfersou do not hard-code this neither; create a getCalendarTypes() method for both cases.
Member
Author
There was a problem hiding this comment.
@hvelarde I didn't finish the changes. My first step is to remove portal_calendar, after I'll refactor the code and these methods will be removed.
ade5431 to
00741ca
Compare
| start = DateTime(self.year, self.month, day['day']) | ||
| end = start + 1 | ||
| query = dict( | ||
| portal_type='Event', review_state='published', |
Member
There was a problem hiding this comment.
@rodfersou as mentioned before, this can't be hard coded: the query must search for all contenty types providing the IEvent interface.
| day['eventstring'] = '\n'.join(localized_date + [ | ||
| ' {0}'.format(self.getEventString(e)) for e in day['eventslist']]) | ||
| day['date_string'] = '{0}-{1}-{2}'.format(year, month, daynumber) | ||
| def addEvents(self, day): |
| states = ['published'] | ||
| return ''.join(map(lambda x: 'review_state={0}&'.format(self.url_quote_plus(x)), states)) | ||
|
|
||
| def getEventTypes(self): |
dff29f0 to
93fd065
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #633