Skip to content

Commit

Permalink
Make 'make static' work.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPalard committed Nov 3, 2023
1 parent 06b9485 commit 5db2acd
Show file tree
Hide file tree
Showing 13 changed files with 140 additions and 137 deletions.
22 changes: 16 additions & 6 deletions pyconfr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from urllib.request import urlopen
from urllib.error import HTTPError
from xml.etree import ElementTree

from bs4 import BeautifulSoup
Expand Down Expand Up @@ -33,9 +34,12 @@ def page(name='index', lang='fr'):

@app.route('/2024/<lang>/talks/<category>.html')
def talks(lang, category):
try:
with urlopen('https://cfp-2024.pycon.fr/schedule/xml/') as fd:
tree = ElementTree.fromstring(fd.read().decode('utf-8'))
except HTTPError:
return []
talks = []
with urlopen('https://cfp-2024.pycon.fr/schedule/xml/') as fd:
tree = ElementTree.fromstring(fd.read().decode('utf-8'))
for day in tree.findall('.//day'):
for event in day.findall('.//event'):
talk = {child.tag: child.text for child in event}
Expand All @@ -54,8 +58,11 @@ def talks(lang, category):

@app.route('/2024/<lang>/full-schedule.html')
def schedule(lang):
with urlopen('https://cfp-2024.pycon.fr/schedule/html/') as fd:
html = fd.read().decode('utf-8')
try:
with urlopen('https://cfp-2024.pycon.fr/schedule/html/') as fd:
html = fd.read().decode('utf-8')
except HTTPError:
html = ""

if lang == 'fr':
html = (
Expand Down Expand Up @@ -98,8 +105,11 @@ def schedule(lang):

@app.route('/2024/pyconfr-2024.ics')
def calendar():
with urlopen('https://cfp-2024.pycon.fr/schedule/ics/') as fd:
calendar = Calendar.from_ical(fd.read())
try:
with urlopen('https://cfp-2024.pycon.fr/schedule/ics/') as fd:
calendar = Calendar.from_ical(fd.read())
except HTTPError:
calendar = Calendar()

# Delete sprints
calendar.subcomponents = [
Expand Down
2 changes: 1 addition & 1 deletion static/sass/schedule.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
font-family: Manrope
font-weight: 100 400
font-style: normal
src: url(/2023/static/fonts/manrope/Manrope-Regular.otf)
src: url(/2024/static/fonts/manrope/Manrope-Regular.otf)

html
font-family: Manrope
Expand Down
13 changes: 6 additions & 7 deletions templates/en/index.jinja2.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block content %}
<section class="coverboard">
<div class="cover">
<img src="/2023/static/images/banniere.png" width="1920" height="753" alt="" />
<img src="/2024/static/images/banniere.png" width="1920" height="753" alt="" />
</div>
<div class="program-button">
<a class="button" href="{{ url_for('page', name='schedule', lang=lang) }}">Schedule</a>
Expand All @@ -14,7 +14,7 @@
<article class="pycon-presentation">
<h1>Presenting PyConFR 2024!</h1>
<!--
<p class="pycon-date">February 16<sup>th</sup> – 19<sup>th</sup> 2023 at Bordeaux</p>
<p class="pycon-date">October 30<sup>th</sup> – November 3<sup>rd</sup> 2024 at Strasbourg</p>
-->
<p>
Organized by <a href="https://afpy.org">AFPy</a>, this four days conference is free, entirely coordinated by volunteers and dedicated to bringing together people interested by the <a href="https://python.org">Python</a> programming language.
Expand Down Expand Up @@ -74,12 +74,11 @@ <h2>AFPy</h2>
<article id="place">
<h2>The Place</h2>
<section>
<img src="{{ url_for('static', filename='images/partners/Université de Bordeaux.svg') }}"/>
<img src="{{ url_for('static', filename='images/partners/UFR.png') }}"/>
<address>
Université de Bordeaux
Bâtiment A22
351 Cours de la Libération
33400 Talence
UFR Mathématique et Informatique
7 rue René Descartes
67000 Strasbourg
</address>
<a class="button" href="{{ url_for('page', name='venue', lang=lang) }}">
More Details
Expand Down
8 changes: 4 additions & 4 deletions templates/en/news.jinja2.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ <h2>Actualités</h2>
<h3>PyConFr 2024</h3>

<p>
The 2023 edition of the francophone community's conference on Python will
be held in Bordeaux from February 16<sup>th</sup> to February
19<sup>th</sup> 2024.
The 2024 edition of the francophone community's conference on Python will
be held in Strasbourg from October 30<sup>th</sup> to November
3<sup>rd</sup> 2024.
</p>

<p>
Expand All @@ -29,7 +29,7 @@ <h3>PyConFr 2024</h3>
</p>

<p>
This event is hosted by the Université de Bordeaux. Thanks to them :).
This event is hosted by the Université of Strasbourg. Thanks to them :).
</p>

<p>
Expand Down
3 changes: 1 addition & 2 deletions templates/en/schedule.jinja2.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h3>Registration</h3>
must <a href="https://www.afpy.org/adherer">become a member</a>.
</p>
<div class="column center">
<a class="button" href="https://www.helloasso.com/associations/afpy/evenements/pyconfr-2023">Register</a>
<a class="button" href="https://www.helloasso.com/associations/afpy/evenements/pyconfr-2024">Register</a>
</div>

</section>
Expand All @@ -67,7 +67,6 @@ <h3>Registration</h3>
<h3>Saturday night dinner</h3>
<p>
A dinner is organized on Saturday night, from 7:30 PM to 11:00 PM,
in <a href="https://www.bordeaux.fr/l11032/agora-du-haut-carre">Haut-Carré (GPS : 44.81013118539135, -0.5945402728893399)</a>,
only for the ones who chose the option during their registration.
</p>
<p>
Expand Down
2 changes: 1 addition & 1 deletion templates/en/talks.jinja2.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends '_layout.jinja2' %}

{% set days = {'2023-02-18': 'Saturday', '2023-02-19': 'Sunday'} %}
{% set days = {'2024-11-02': 'Saturday', '2024-11-03': 'Sunday'} %}
{% set titles = {'30m': '30-minute Talks', '1h': '1-hour Talks', 'workshop': 'Workshops', 'sprint': 'Sprints', 'plenary': 'Plenary sessions'} %}
{% set page_name = 'talks-' + category %}

Expand Down
107 changes: 49 additions & 58 deletions templates/en/venue.jinja2.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@ <h2>The venue</h2>
<section>
<h3>Address</h3>
<p>
PyConFr 2023 is held at the <a href="https://www.u-bordeaux.fr/">Université
de Bordeaux</a>, on
the <a href="https://www.u-bordeaux.fr/Universite/Campus/Campus-Talence-Pessac-Gradignan">Campus
de Talence</a>.
PyConFr 2024 is held at the <a href="https://mathinfo.unistra.fr/">UFR Mathématique et Informatique</a> in Strasbourg.
</p>
<address>
Université de Bordeaux
Bâtiment A22
351 Cours de la Libération
33400 Talence
UFR Mathématique et Informatique
7 rue René Descartes
Strasbourg
</address>
<p>
GPS coordinates: 44.8073 -0.5988
GPS coordinates: <a href="https://www.openstreetmap.org/#map=18/48.57981/7.76302">48.5798 7.7630</a>
</p>
{{ map('Fullscreen') }}
</section>
Expand All @@ -29,114 +25,109 @@ <h3>Reach the Campus</h3>
<section>
<h4>From the center (~30 minutes)</h4>
<p>
You can reach the campus by
the <a href="https://www.infotbm.com/info/line/tbt-60">tram B</a>
and stop at the "Béthanie" station.
Vestibulum convallis, lorem a tempus semper, dui dui euismod
elit, vitae placerat urna tortor vitae lacus.

Sed diam. Curabitur vulputate vestibulum lorem. Aliquam
erat volutpat. Nunc eleifend leo vitae magna. In id erat
non orci commodo lobortis. Proin neque massa, cursus ut,
gravida ut, lobortis eget, lacus. Sed diam. Praesent
fermentum tempor tellus. Nullam tempus.
</p>
</section>

<section>
<h4>From the train station (~25 minutes)</h4>
<p>
From the train station, you can reach the campus by the
<a href="https://www.infotbm.com/info/line/tbc-10">Bus line 10</a>
at stop at the "Peixotto" stop.
Aliquam erat volutpat. Nunc eleifend leo vitae magna. In
id erat non orci commodo lobortis. Proin neque massa,
cursus ut, gravida ut, lobortis eget, lacus. Sed diam.
Praesent fermentum tempor tellus.
</p>
</section>

<section>
<h4>From Bordeaux Airport (~1 heure ± 15 minutes)</h4>
<h4>From Strasbourg Airport (~1 heure ± 15 minutes)</h4>
<p>
From the Bordeaux-Mérignac airport, multiple route with regards to the schedule.
In any case you will have only one connection:
Sed bibendum. Nunc eleifend leo vitae magna.
<ul>
<li>you can either take the
<a href="https://www.infotbm.com/info/line/tbc-01">Bus line 1</a>
or the <a href="https://www.infotbm.com/info/line/tbc-48">Bus line 48</a>
to connect with the <a href="https://www.infotbm.com/info/line/tbt-60">tram B</a>,
</li>
<li>
you can also take the <a href="https://www.infotbm.com/info/line/tbc-01">Bus line 1</a> to connect with either the
<a href="https://www.infotbm.com/info/line/tbc-20">Bus line 20</a> or the
<a href="https://www.infotbm.com/info/line/tbc-34">Bus line 34</a>.
</li>
<li>Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus.</li>
<li>Cum sociis natoque penatibus et magnis dis <em>parturient</em> montes, nascetur ridiculus mus.</li>
<li>Etiam vel neque nec dui <em>dignissim</em> bibendum.</li>
<li>Proin neque massa, cursus ut, gravida ut, lobortis eget, lacus.</li>
</ul>
</p>
</section>

<section>
<h4>Self-Service Bikes (~45 minutes)</h4>
<p>
You can also reach the campus
using <a href="https://www.infotbm.com/en/v3.html">self-service
bikes (called "V3")</a>, at the Arts et Métiers (#112) station.
Proin neque massa, cursus ut, gravida ut, lobortis eget,
lacus. Praesent augue.
</p>
</section>
</section>

<section>
<h3>Travelling to Bordeaux</h3>
<h3>Travelling to Strasbourg</h3>

<section>
<h4>Car</h4>
<p>It will be possible to park on the university parking.</p>
<h4>Car</h4>
<p>Praesent fermentum tempor tellus.</p>
</section>

<section>
<h4>Train</h4>
<p>The TGV stops at Saint-Jean Bordeaux Train station, next to
Bordeaux city center. It is quite handy to take a bus or a
tram from there to get to the university.</p>
<p>Mauris mollis tincidunt felis. Sed id ligula quis est
convallis tempor.</p>
</section>

<section>
<h4>With the tram</h4>
<p>
Leaving the station, you can take the tram C and stop at
Quinconces station to connect with the tram B and stop at
the Béthanie station.
Aliquam erat volutpat. Nunc eleifend leo vitae magna. In
id erat non orci commodo lobortis. Proin neque massa,
cursus ut, gravida ut, lobortis eget, lacus. Sed diam.

If you like to walk, you can also walk along the "Cours de
la Marne" for about 1.8 km and take the Tram B from "Place
de la Victoire".
Praesent fermentum tempor tellus. Nullam tempus. Mauris ac
felis vel velit tristique imperdiet. Donec at pede. Etiam
vel neque nec dui dignissim bibendum. Vivamus id enim.
Phasellus neque orci, porta a, aliquet quis, semper a,
massa. Phasellus purus. Pellentesque tristique imperdiet
tortor. Nam euismod tellus id erat.
</p>
</section>

<section>
<h4>With the Bus</h4>
<p>
<a href="https://www.infotbm.com/info/line/tbc-10">The Bus
line 10</a> stops at "Peixotto" next to the University
entrance.
Curabitur vulputate vestibulum lorem.
</p>
</section>

<section>
<h4>Plane</h4>
<p>Land at the Bordeaux-Mérignac airport and reach the tram to
get to the university.</p>
<p>Nunc porta vulputate tellus.</p>
</section>
</section>

<section>
<h3>Housing Advice</h3>
<section>
<h4>In Bordeaux</h4>
<h4>In Strasbourg</h4>
<p>
Try to find an accomodation close to the
<a href="https://www.infotbm.com/info/line/tbt-60">tram B line</a>,
the fastest way to reach the university.
Mauris mollis tincidunt felis.
</p>
</section>
<section>
<h4>On the campus</h4>
<p>
There are two options not to far from the campus.
<ul>
<li><a href="https://www.teneo.fr/">Ténéo Apparthotel Talence (€70-€80 per night)</a> — About 10 minutes walk</li>
<li><a href="https://www.studotel-bordeaux.fr/tarifs-location-studio-bordeaux.html">Stud’Hotel (~€50 per night)</a> — About 20 minutes walk</li>
<li><a href="https://sejours-affaires.com">Séjours & Affaires Bordeaux Yser (~€60 per night)</a> — About 23 minutes of tram</li>
</ul>
Nullam tristique diam non turpis.
<ul>
<li>Nam vestibulum accumsan nisl.</li>
<li>Mauris mollis tincidunt felis.</li>
<li>In id erat non orci commodo lobortis.</li>
</ul>
</p>
</section>
</section>
Expand Down
11 changes: 5 additions & 6 deletions templates/fr/index.jinja2.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<article class="pycon-presentation">
<h1>Bienvenue à la PyConFR 2024 !</h1>
<!--
<p class="pycon-date">Du 16 au 19 février 2023 à Bordeaux</p>
<p class="pycon-date">Du 30 octobre au 3 novembre 2024 à Strasbourg</p>
-->
<p>Organisée par <a href="https://afpy.org">l'AFPy</a>, cette conférence de quatre jours est gratuite, entièrement gérée par des bénévoles et dédiée au regroupement des personnes intéressées par le langage de programmation <a href="https://python.org">Python</a>.</p>
</article>
Expand Down Expand Up @@ -73,12 +73,11 @@ <h2>AFPy</h2>
<article id="place">
<h2>Le lieu</h2>
<section>
<img src="{{ url_for('static', filename='images/partners/Université de Bordeaux.svg') }}"/>
<img src="{{ url_for('static', filename='images/partners/UFR.png') }}"/>
<address>
Université de Bordeaux
Bâtiment A22
351 Cours de la Libération
33400 Talence
UFR Mathématique et Informatique
7 rue René Descartes
67000 Strasbourg
</address>
<a class="button" href="{{ url_for('page', name='venue', lang=lang) }}">
Plus de détails
Expand Down
8 changes: 4 additions & 4 deletions templates/fr/news.jinja2.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
{% block content %}
<article>
<h2>Actualités</h2>

<section>
<h3>PyConFr 2024</h3>
<p>
L'édition 2024 de la conférence sur Python de la communauté francophone se
tiendra à Bordeaux du 16 février au 19 février 2024.
tiendra à Strasbourg du 30 octobre au 3 novembre 2024.
</p>

<p>
Expand All @@ -31,8 +31,8 @@ <h3>PyConFr 2024</h3>
</p>

<p>
Cet événement est hébergé par L'Université de Bordeaux. Merci pour leur
chaleureux accueil :).
Cet événement est hébergé par L’UFR de mathématique et
d'informatique. Merci pour leur chaleureux accueil :).
</p>

<p>
Expand Down
3 changes: 1 addition & 2 deletions templates/fr/schedule.jinja2.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h3>Inscriptions</h3>
devez <a href="https://www.afpy.org/adherer">devenir membre</a>.
</p>
<div class="column center">
<a class="button" href="https://www.helloasso.com/associations/afpy/evenements/pyconfr-2023">S’inscrire</a>
<a class="button" href="https://www.helloasso.com/associations/afpy/evenements/pyconfr-2024">S’inscrire</a>
</div>
</p>
</section>
Expand All @@ -73,7 +73,6 @@ <h3>Inscriptions</h3>
<h3>Repas du samedi soir</h3>
<p>
Un repas est organisé le samedi soir, de 19 h 30 à 23 h 00,
au <a href="https://www.bordeaux.fr/l11032/agora-du-haut-carre">Haut-Carré (GPS : 44.81013118539135, -0.5945402728893399)</a>,
uniquement pour les personnes ayant réservé lors de leur inscription.
</p>
<p>
Expand Down
Loading

0 comments on commit 5db2acd

Please sign in to comment.