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

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

        @register.assignment_tag
def is_popup_var():
    """
    Django 1.6 requires _popup=1 for raw id field popups, earlier versions
    require pop=1.

    The explicit version check is a bit ugly, but works well.

    (Wrong parameters aren't simply ignored by django.contrib.admin, the
    change list actively errors out by redirecting to ?e=1)
    """
    if django.VERSION < (1, 6):
        return 'pop=1'
    return '_popup=1'
        


src/f/e/FeinCMS-1.9.3/feincms/admin/item_editor.py   FeinCMS(Download)
from feincms.extensions import ExtensionModelAdmin
from feincms.signals import itemeditor_post_save_related
from feincms.templatetags.feincms_admin_tags import is_popup_var
 
 
 
            'FEINCMS_FRONTEND_EDITING': settings.FEINCMS_FRONTEND_EDITING,
            'FEINCMS_POPUP_VAR': is_popup_var(),
        }
 

src/f/e/feincms-HEAD/feincms/admin/item_editor.py   feincms(Download)
from feincms.extensions import ExtensionModelAdmin
from feincms.signals import itemeditor_post_save_related
from feincms.templatetags.feincms_admin_tags import is_popup_var
 
 
 
            'FEINCMS_FRONTEND_EDITING': settings.FEINCMS_FRONTEND_EDITING,
            'FEINCMS_POPUP_VAR': is_popup_var(),
        }