Skip to content

Instantly share code, notes, and snippets.

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

Kevin Ramirez quevon24

🏠
Working from home
View GitHub Profile
@quevon24
quevon24 / pagination.html
Created August 7, 2017 15:51 — forked from oscarmcm/pagination.html
A Django template tag for pagination
{% load i18n %}
<div class="row">
<div class="col-xs-12">
<section class="paginator text-center">
<nav>
<ul class="pagination">
<li>
{% if page.has_previous %}
<a href="?page={{ page.previous_page_number }}" aria-label="Previous">
@quevon24
quevon24 / staticencoder.py
Created June 5, 2017 17:53 — forked from goldhand/staticencoder.py
Django template tag for encoding images in base64 and rendering with server
from django import template
from django.contrib.staticfiles.finders import find as find_static_file
from django.conf import settings
register = template.Library()
@register.simple_tag
def encode_static(path, encoding='base64', file_type='image'):
"""