Changes between Version 1 and Version 2 of Ticket #27149


Ignore:
Timestamp:
Aug 30, 2016, 2:18:05 PM (8 years ago)
Author:
MikiSoft
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27149 – Description

    v1 v2  
    22
    33{{{
     4APP_LABEL = os.path.basename(os.path.dirname(__file__))
    45def generic_rel_filter(model, target, column, id):
    56    return model.objects.extra(where=['''
     
    78        from {app_label}_{target}
    89        where content_type_id = (select id from django_content_type where model = '{model}')
    9             and {column} = {id})'''.format(app_label=os.path.basename(os.path.dirname(__file__)), model=model.__name__.lower(), target=target, column=column, id=id)])
     10            and {column} = {id})'''.format(app_label=APP_LABEL, model=model.__name__.lower(), target=target, column=column, id=id)])
    1011}}}
    1112
Back to Top