Skip to content

Instantly share code, notes, and snippets.

View neozhixuan's full-sized avatar
🏠
Working from home

Neo Zhi Xuan neozhixuan

🏠
Working from home
View GitHub Profile
@nix1947
nix1947 / dynamic rows loading
Created February 11, 2017 03:45
dynamically populating rows and columns of bootstrap in django template
<div class="container">
{% for project in projects %}
{% if forloop.counter0|divisibleby:3 %} <div class="row text-center"> {% endif %}
<div class="col-md-4" onclick="window.location.href='{% url 'club:robotics_detail' project.id %}'" style="cursor: pointer">
<div class="card">
<img src="http://placehold.it/300X150" alt="">
<div class="card-content">
<br>
<h4>Project {{ forloop.counter }}</h4>
<hr>