Ephes Blog

Miscellaneous things. Not sure what to put here, yet.

PyCon 2017

, Jochen
PyCon 2017 is over now and I liked it a lot. It was a really well organized event and the talks were great. I already knew the conference location because I lived only a few hundred meters away for a long time. So it didn't came as a surprise for me that it was awesome.

On my way to pycon

, Jochen
Decided to join this years pycon/pydata conference in Karlsruhe. Since this was my home town for a long time, I'm looking forward to meet  friends and family. The conference schedule is filled with data science talks, so it should be quite interessting for me :).

The train is quite empty, so maybe I'll be able to work on some blog stuff til Karlsruhe:

Added rudimentary gallery support

, Jochen

Thought it would be nice to have multiple images in an entry. But then they should not all be shown in full size. So I misused the modal component of bootstrap for that. Still have to figure out how to make landscape images wider and portrait pictures smaller, but it's a start.

Here are three images from the pyddf meeting of last week:

Added pagination

, Jochen

Implementing pagination was also quite easy. Since I'm using class based views, I only had to add the attribute paginated_by = 5 to my view class and this snippet to my blogpost_list.html template:

{% verbatim %}
<nav aria-label="pagination">
  <ul class="pagination">
    {% if page_obj.has_previous %}
      <li class="page-item"><a class="page-link" href="?page={{ page_obj.previous_page_number }}">previous</a><li>
    {% endif %}
    {% if page_obj.has_next %}
      <li class="page-item"><a class="page-link" href="?page={{ page_obj.next_page_number }}">next</a></li>
    {% endif %}
{% endverbatim %}


, Jochen

Now I added very basic video support: