diff --git a/generate_site/generate.py b/generate_site/generate.py index fe01fe1..eef8cb0 100644 --- a/generate_site/generate.py +++ b/generate_site/generate.py @@ -19,12 +19,28 @@ reader = csv.DictReader(f) keynotes = list(reader) +with open("sponsors.csv") as f: + reader = csv.DictReader(f) + _sponsors = list(reader) + +sponsors = {} +for s in _sponsors: + _type = s["type"] + if _type not in sponsors: + sponsors[_type] = [] + sponsors[_type].append({ + "name": s["name"], + "image": s["image"], + "url": s["url"], + }) + # TODO: Download images? 'Headshot image' is the column name ##### Template configuration conf = { "ORG": df_org, "KEYNOTES": keynotes[:3], # only 3 keynotes + "SPONSORS": sponsors, } templates = { diff --git a/generate_site/sponsors.csv b/generate_site/sponsors.csv new file mode 100644 index 0000000..f8860ef --- /dev/null +++ b/generate_site/sponsors.csv @@ -0,0 +1,3 @@ +name,type,image,url +"IndyPy","Community","community_indypy.png","https://indypy.org/" +"PyTexas","Community","community_pytexas.png","https://www.pytexas.org/" diff --git a/generate_site/templates/index-base.html b/generate_site/templates/index-base.html index a2150d6..3bbe340 100644 --- a/generate_site/templates/index-base.html +++ b/generate_site/templates/index-base.html @@ -120,7 +120,7 @@
+ Know the sponsors of our conference. +
+ + {% if SPONSORS['Community'] %} +