Skip to content

Instantly share code, notes, and snippets.

@hynekcer
hynekcer / django_dot_filter.py
Last active November 4, 2020 14:58
Django filters with relational operators and dot to related fields instead of double underscores
from django.db.models import Q
from django.utils import six
class MetaV(type):
# metaclass to automatically create an instance by . dot
def __getattr__(self, name):
if name.startswith('_'):
return super(self, MetaV).__getattr__(name)
else:
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active April 30, 2024 14:11
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

(function($) {
$.fn.drags = function(opt) {
opt = $.extend({handle:"",cursor:"move"}, opt);
if(opt.handle === "") {
var $el = this;
} else {
var $el = this.find(opt.handle);
}