code stringlengths 3 6.57k |
|---|
RHSubcatInfo(RHDisplayCategoryBase) |
_category_query_options(cls) |
joinedload('children') |
children_strategy.load_only('id') |
children_strategy.undefer('deep_events_count') |
load_only('id', 'parent_id', 'protection_mode') |
_process(self) |
format_number(c.deep_events_count) |
jsonify_data(flash=False, event_counts=event_counts) |
RHDisplayCategoryEventsBase(RHDisplayCategoryBase) |
joinedload('children') |
load_only('id', 'title', 'protection_mode') |
undefer('attachment_count') |
undefer('has_events') |
joinedload('person_links') |
joinedload('series') |
undefer_group('series') |
_process_args(self) |
RHDisplayCategoryBase._process_args(self) |
now_utc(exact=False) |
astimezone(self.category.display_tzinfo) |
format_event_date(self, event) |
event.start_dt.astimezone(tzinfo) |
event.end_dt.astimezone(tzinfo) |
format(to_unicode(format_date(start_dt, timezone=tzinfo) |
to_unicode(format_date(end_dt, timezone=tzinfo) |
elif (start_dt.month != end_dt.month) |
or (start_dt.day != end_dt.day) |
format(to_unicode(format_date(start_dt, day_month, timezone=tzinfo) |
to_unicode(format_date(end_dt, day_month, timezone=tzinfo) |
to_unicode(format_date(start_dt, day_month, timezone=tzinfo) |
group_by_month(self, events) |
_format_tuple(x) |
format_date(date(year, month, 1) |
list(events) |
_key(event) |
event.start_dt.astimezone(self.category.tzinfo) |
groupby(events, key=_key) |
map(_format_tuple, months) |
happening_now(self, event) |
is_recent(self, dt) |
relativedelta(weeks=1) |
RHDisplayCategory(RHDisplayCategoryEventsBase) |
category (events/subcategories) |
_process(self) |
relativedelta(months=1, day=1, hour=0, minute=0) |
relativedelta(months=1, day=1, hour=0, minute=0) |
db.session.query(Event.start_dt) |
filter(Event.start_dt >= self.now, Event.category_id == self.category.id) |
order_by(Event.start_dt.asc() |
Event.id.asc() |
first() |
or (None,) |
db.session.query(Event.start_dt) |
filter(Event.start_dt < self.now, Event.category_id == self.category.id) |
order_by(Event.start_dt.desc() |
Event.id.desc() |
first() |
or (None,) |
relativedelta(months=1, day=1, hour=0, minute=0) |
previous_event_start_dt.replace(day=1, hour=0, minute=0) |
Event.query.with_parent(self.category) |
options(*self._event_query_options) |
order_by(Event.start_dt.desc() |
Event.id.desc() |
event_query.filter(Event.start_dt < past_threshold) |
event_query.filter(Event.start_dt >= future_threshold) |
current_event_query.filter(Event.start_dt < future_threshold) |
all() |
self.group_by_month(events) |
future_event_query.count() |
past_event_query.count() |
future_event_query.all() |
bool(self.category.id in session.get('fetch_future_events_in', set() |
or
(session.user and session.user.settings.get('show_future_events', False) |
bool(self.category.id in session.get('fetch_past_events_in', set() |
or
(session.user and session.user.settings.get('show_past_events', False) |
sorted(self.category.get_manager_list() |
attrgetter('principal_type.name', 'name') |
len(events) |
future_threshold.strftime(threshold_format) |
past_threshold.strftime(threshold_format) |
map(serialize_event_for_json_ld, json_ld_events) |
url_for('.export_atom', self.category) |
_('Events of "{}"') |
format(self.category.title) |
format(self.category.id) |
WPCategory.render_template('display/category.html', self.category, **params) |
get_recent_news() |
get_upcoming_events() |
RHEventList(RHDisplayCategoryEventsBase) |
_parse_year_month(self, string) |
datetime.strptime(string, '%Y-%m') |
except (TypeError, ValueError) |
self.category.display_tzinfo.localize(dt) |
_process_args(self) |
RHDisplayCategoryEventsBase._process_args(self) |
self._parse_year_month(request.args.get('before') |
self._parse_year_month(request.args.get('after') |
BadRequest('"before" or "after" parameter must be specified') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.