Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/d/j/django_qbe-0.2.0/django_qbe/savedqueries/admin.py   django_qbe(Download)
from django.utils.functional import update_wrapper
 
from django_qbe.utils import pickle_encode, get_query_hash
from django_qbe.utils import admin_site
 
    def run_link(self, obj):
        info = self.model._meta.app_label, self.model._meta.module_name
        pickled = pickle_encode(obj.query_data)
        query_hash = get_query_hash(pickled)
        return u'<span class="nowrap"><a href="%s">%s</a> | <a href="%s">%s</a></span>' % \
    def run_view(self, request, object_id, extra_context=None):
        obj = self.get_object(request, unquote(object_id))
        data = obj.query_data
        pickled = pickle_encode(data)
        query_hash = get_query_hash(pickled)

src/d/j/django_qbe-0.2.0/django_qbe/views.py   django_qbe(Download)
 
from django_qbe.forms import QueryByExampleFormSet, DATABASES
from django_qbe.utils import (autocomplete_graph, qbe_models, formats,
                              pickle_encode, pickle_decode, get_query_hash,
                              admin_site)
        if formset.is_valid():
            pickled = pickle_encode(data)
            query_hash = get_query_hash(pickled)
            query_key = "qbe_query_%s" % query_hash
            request.session[query_key] = data
def qbe_bookmark(request):
    data = request.GET.get("data", None)
    if data:
        query_hash = get_query_hash(data)
        query_key = "qbe_query_%s" % query_hash