-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
display english and spanish event media links correctly #295
Conversation
to generate both live media links for bilingual events, we need the guids of both the english and spanish events. to do that, we'll add the spanish event as an additional source to the unified event in the upstream scraper. |
blurgh, we don't import all of the sources into |
we also only add the web detail link if it exists, otherwise we just add a link to the calendar. these links don't seem to exist, until after the meeting has passed. |
How would we get the GUID if the meeting detail url didn't exist? Is that knowable some other way? |
@fgregg it's on the api event; we save it in the extras, and import it in django-councilmatic. we could save the spanish guid in the extras, as well, but we'd still need to make a change in django-councilmatic to facilitate > 1 event guid. |
This seems sensible to me. It also seems to me that we should add the spanish api event url and, when available, the spanish legistar meeting url to the OCD data when available, even if we don't import that data into councilmatic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks pretty good. I think one of your methods is doing too much, but otherwise looks good.
lametro/models.py
Outdated
guid = self.extras['guid'] | ||
english_url = self.BASE_MEDIA_URL + 'event_id={guid}'.format(guid=guid) | ||
|
||
return self._valid_or_generic(english_url, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me this would be clearer if you _valid_or_gener was just _valid, and then you handled the fallback case here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great point, updated in eb57335
Also add untracked meta migration
this pr:
EventMedia
event.media_urls
rather than only oneevent.media_url
extra_context
here to grab both english and spanish live media links (and make logic more obvious: a link to live media appears in legistar when a meeting is ongoing)addresses #263