Allow extra settings for meetings to be used in templates
Besides looking for the required values, allow any extra values to be saved and referenced from templates. Change-Id: I7395a92f447aee943da54aa0439dd0c683da176a
This commit is contained in:
parent
cb23724c95
commit
74cb5acd5f
13
README.rst
13
README.rst
@ -120,6 +120,11 @@ The file name should be a lower-cased, hyphenated version of the meeting name,
|
||||
ending with ``.yaml`` . For example, ``Keystone team meeting`` should be
|
||||
saved under ``keystone-team-meeting.yaml``.
|
||||
|
||||
Any other values listed in the YAML file are also available for use in
|
||||
templates, making it easy to build links to agenda pages for the
|
||||
meeting or logs of past meetings. In the template file, use
|
||||
``meeting.extras.name`` to access the value.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
@ -165,3 +170,11 @@ will be import into Python as a dictionary.
|
||||
This meeting is a weekly gathering of developers working on OpenStack.
|
||||
Compute (Nova). We cover topics such as release planning and status,
|
||||
bugs, reviews, and other current topics worthy of real-time discussion.
|
||||
|
||||
* An extra property containing the agenda for the meeting is saved in
|
||||
``agenda_url`` and can be accessed in the template file as
|
||||
``meeting.extras.agenda_url``.
|
||||
|
||||
::
|
||||
|
||||
agenda_url: https://wiki.openstack.org/wiki/Meetings/Nova
|
||||
|
@ -67,6 +67,14 @@ class Meeting(object):
|
||||
"attribute '{0}'".format(e.args[0]))
|
||||
raise
|
||||
|
||||
# Find any extra values the user has provided that they might
|
||||
# want to have access to in their templates.
|
||||
self.extras = {}
|
||||
self.extras.update(yaml_obj)
|
||||
for k in ['chair', 'description', 'project', 'schedule']:
|
||||
if k in self.extras:
|
||||
del self.extras[k]
|
||||
|
||||
try:
|
||||
self.filefrom = os.path.basename(data.name)
|
||||
except AttributeError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user