Skip to content

Instantly share code, notes, and snippets.

View jgsogo's full-sized avatar
🦄
New times ahead

Javier G. Sogo jgsogo

🦄
New times ahead
View GitHub Profile
@puetzk
puetzk / conanfile.py
Created November 30, 2018 04:37
SystemPackageConan
from conans import ConanFile, tools
from configparser import ConfigParser
import os
def remove_prefix(s, prefix):
return s[len(prefix):] if s.startswith(prefix) else s
class SystemPackageConan(ConanFile):
settings = 'os', 'arch'
options = { "pkg_config" : "ANY" }
@cspanring
cspanring / pagination.html
Created November 8, 2011 02:53
linaro django pagination template for Bootstrap framework
{# use in combination with https://github.com/zyga/django-pagination #}
{# and http://twitter.github.com/bootstrap/ #}
{# project-dir/templates/pagination/pagination.html #}
{% if is_paginated %}
{% load i18n %}
<div class="pagination">
<ul>
{% block previouslink %}
{% if page_obj.has_previous %}
'''Manager-based polymorphic model inheritance.
This module provides a non-intrusive approach for accessing polymorphically
instances of a model hierarchy. Non-intrusive means:
- It does not require extending a custom ``Model`` base class or metaclass.
- It does not require a ``ForeignKey`` to ``ContentType`` or the ``contenttypes``
app in general. Instead the real class of an instance is determined based on
the value (**polymorphic identity**) of a user-specified discriminating field
(**polymorphic on**).
- It does not override the default (or any other) model ``Manager`` (unless