Issue #189 new

Handler Nested Fields 2 Levels Down Infinite Loop

Alejandro Wainzinger
created an issue

Given a Handler with the following fields list:

{{{ fields = ( 'place', ( 'participant_set', ('user', ('username',))) ) }}}

The server goes into an infinite loop doing some SQL queries, while the following works fine:

{{{ fields = ( 'place', ( 'participant_set', ('user', )) ) }}}

Unless I'm missing something, it seems as if more than 1 level down of a nested query results in an infinite loop. I tried debugging this but I'm not sure where to begin. Here's part of the infinite loop as far as I single-stepped before getting tired.

{{{ 0 errors found Django version 1.4 pre-alpha, using settings 'foo.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C.

django-piston/piston/emitters.py(301)construct() -> a = _any(self.data, self.fields) (Pdb) s --Call-- /Users/awainzin/django-piston/piston/emitters.py(98)_any() -> def _any(thing, fields=None): (Pdb) s /Users/awainzin/django-piston/piston/emitters.py(102)_any() -> ret = None (Pdb) s /Users/awainzin/django-piston/piston/emitters.py(104)_any() -> if isinstance(thing, QuerySet): (Pdb) s /Users/awainzin/django-piston/piston/emitters.py(105)_any() -> ret = _qs(thing, fields) (Pdb) s --Call-- /Users/awainzin/django-piston/piston/emitters.py(281)_qs() -> def _qs(data, fields=None): (Pdb) s /Users/awainzin/django-piston/piston/emitters.py(285)_qs() -> return [ _any(v, fields) for v in data ] (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/query.py(87)iter() -> def iter(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(88)iter() -> if self._result_cache is None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(89)iter() -> self._iter = self.iterator() (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(90)iter() -> self._result_cache = [] (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(91)iter() -> if self._iter: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(92)iter() -> return self._result_iter() (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/query.py(92)iter()-><generat...06ba36e0> -> return self._result_iter() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/query.py(97)_result_iter() -> def _result_iter(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(98)_result_iter() -> pos = 0 (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(99)_result_iter() -> while 1: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(100)_result_iter() -> upper = len(self._result_cache) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(101)_result_iter() -> while pos < upper: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(104)_result_iter() -> if not self._iter: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(106)_result_iter() -> if len(self._result_cache) <= pos: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(107)_result_iter() -> self._fill_cache() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/query.py(776)_fill_cache() -> def _fill_cache(self, num=None): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(781)_fill_cache() -> if self._iter: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(782)_fill_cache() -> try: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(783)_fill_cache() -> for i in range(num or ITER_CHUNK_SIZE): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(784)_fill_cache() -> self._result_cache.append(self._iter.next()) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/query.py(214)iterator() -> def iterator(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(219)iterator() -> fill_cache = self.query.select_related (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(220)iterator() -> if isinstance(fill_cache, dict): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(223)iterator() -> requested = None (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(224)iterator() -> max_depth = self.query.max_depth (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(226)iterator() -> extra_select = self.query.extra_select.keys() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1821)_extra_select() -> def _extra_select(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1822)_extra_select() -> if self._extra_select_cache is not None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1824)_extra_select() -> elif self.extra_select_mask is not None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1831)_extra_select() -> return self.extra (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1831)_extra_select()->{} -> return self.extra (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/utils/datastructures.py(164)keys() -> def keys(self): (Pdb) s /Library/Python/2.7/site-packages/django/utils/datastructures.py(165)keys() -> return self.keyOrder[:] (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/utils/datastructures.py(165)keys()->[] -> return self.keyOrder[:] (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(227)iterator() -> aggregate_select = self.query.aggregate_select.keys() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1803)_aggregate_select() -> def _aggregate_select(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1809)_aggregate_select() -> if self._aggregate_select_cache is not None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1811)_aggregate_select() -> elif self.aggregate_select_mask is not None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1818)_aggregate_select() -> return self.aggregates (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1818)_aggregate_select()->{} -> return self.aggregates (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/utils/datastructures.py(164)keys() -> def keys(self): (Pdb) s /Library/Python/2.7/site-packages/django/utils/datastructures.py(165)keys() -> return self.keyOrder[:] (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/utils/datastructures.py(165)keys()->[] -> return self.keyOrder[:] (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(229)iterator() -> only_load = self.query.get_loaded_field_names() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1764)get_loaded_field_names() -> def get_loaded_field_names(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1773)get_loaded_field_names() -> collection = {} (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1774)get_loaded_field_names() -> self.deferred_to_data(collection, self.get_loaded_field_names_cb) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(536)deferred_to_data() -> def deferred_to_data(self, target, callback): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(550)deferred_to_data() -> field_names, defer = self.deferred_loading (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(551)deferred_to_data() -> if not field_names: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(552)deferred_to_data() -> return (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(552)deferred_to_data()->None -> return (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1775)get_loaded_field_names() -> return collection (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1775)get_loaded_field_names()->{} -> return collection (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(230)iterator() -> if not fill_cache: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(231)iterator() -> fields = self.model._meta.fields (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/options.py(207)_fields() -> def _fields(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(215)_fields() -> try: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(216)_fields() -> self._field_name_cache (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(219)_fields() -> return self._field_name_cache (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/options.py(219)_fields()->[<django....ield: id>, <django....: leader>, <django....d: place>, <django....art_date>, <django....ted_date>, <django....activity>] -> return self._field_name_cache (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(232)iterator() -> pk_idx = self.model._meta.pk_index() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/options.py(493)pk_index() -> def pk_index(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(497)pk_index() -> return self.fields.index(self.pk) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/options.py(207)_fields() -> def _fields(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(215)_fields() -> try: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(216)_fields() -> self._field_name_cache (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(219)_fields() -> return self._field_name_cache (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/options.py(219)_fields()->[<django....ield: id>, <django....: leader>, <django....d: place>, <django....art_date>, <django....ted_date>, <django....activity>] -> return self._field_name_cache (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/options.py(497)pk_index()->0 -> return self.fields.index(self.pk) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(234)iterator() -> index_start = len(extra_select) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(235)iterator() -> aggregate_start = index_start + len(self.model._meta.fields) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/options.py(207)_fields() -> def _fields(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(215)_fields() -> try: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(216)_fields() -> self._field_name_cache (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(219)_fields() -> return self._field_name_cache (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/options.py(219)_fields()->[<django....ield: id>, <django....: leader>, <django....d: place>, <django....art_date>, <django....ted_date>, <django....activity>] -> return self._field_name_cache (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(237)iterator() -> load_fields = [] (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(240)iterator() -> if only_load: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(256)iterator() -> skip = None (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(257)iterator() -> if load_fields and not fill_cache: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(270)iterator() -> db = self.db (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/query.py(752)db() -> Property (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(755)db() -> if self._for_write: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(757)db() -> return self._db or router.db_for_read(self.model) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/utils.py(114)_route_db() -> def _route_db(self, model, hints): (Pdb) s /Library/Python/2.7/site-packages/django/db/utils.py(115)_route_db() -> chosen_db = None (Pdb) s /Library/Python/2.7/site-packages/django/db/utils.py(116)_route_db() -> for router in self.routers: (Pdb) s /Library/Python/2.7/site-packages/django/db/utils.py(126)_route_db() -> try: (Pdb) s /Library/Python/2.7/site-packages/django/db/utils.py(127)_route_db() -> return hints['instance']._state.db or DEFAULT_DB_ALIAS (Pdb) s KeyError: ('instance',) /Library/Python/2.7/site-packages/django/db/utils.py(127)_route_db() -> return hints['instance']._state.db or DEFAULT_DB_ALIAS (Pdb) s /Library/Python/2.7/site-packages/django/db/utils.py(128)_route_db() -> except KeyError: (Pdb) s /Library/Python/2.7/site-packages/django/db/utils.py(129)_route_db() -> return DEFAULT_DB_ALIAS (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/utils.py(129)_route_db()->'default' -> return DEFAULT_DB_ALIAS (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/query.py(757)db()->'default' -> return self._db or router.db_for_read(self.model) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(271)iterator() -> model = self.model (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(272)iterator() -> compiler = self.query.get_compiler(using=db) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(205)get_compiler() -> def get_compiler(self, using=None, connection=None): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(206)get_compiler() -> if using is None and connection is None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(208)get_compiler() -> if using: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(209)get_compiler() -> connection = connections[using] (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/utils.py(75)__getitem__() -> def __getitem__(self, alias): (Pdb) s /Library/Python/2.7/site-packages/django/db/utils.py(76)__getitem__() -> if alias in self._connections: (Pdb) s /Library/Python/2.7/site-packages/django/db/utils.py(77)__getitem__() -> return self._connections[alias] (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/utils.py(77)__getitem__()-><django....06662e20> -> return self._connections[alias] (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(212)get_compiler() -> for alias, aggregate in self.aggregate_select.items(): (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1803)_aggregate_select() -> def _aggregate_select(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1809)_aggregate_select() -> if self._aggregate_select_cache is not None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1811)_aggregate_select() -> elif self.aggregate_select_mask is not None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1818)_aggregate_select() -> return self.aggregates (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1818)_aggregate_select()->{} -> return self.aggregates (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/utils/datastructures.py(157)items() -> def items(self): (Pdb) s /Library/Python/2.7/site-packages/django/utils/datastructures.py(158)items() -> return zip(self.keyOrder, self.values()) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/utils/datastructures.py(170)values() -> def values(self): (Pdb) s /Library/Python/2.7/site-packages/django/utils/datastructures.py(171)values() -> return map(self.__getitem__, self.keyOrder) (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/utils/datastructures.py(171)values()->[] -> return map(self.__getitem__, self.keyOrder) (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/utils/datastructures.py(158)items()->[] -> return zip(self.keyOrder, self.values()) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(215)get_compiler() -> return connection.ops.compiler(self.compiler)(self, connection, using) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/backends/__init__.py(581)compiler() -> def compiler(self, compiler_name): (Pdb) s /Library/Python/2.7/site-packages/django/db/backends/__init__.py(587)compiler() -> if self._cache is None: (Pdb) s /Library/Python/2.7/site-packages/django/db/backends/__init__.py(589)compiler() -> return getattr(self._cache, compiler_name) (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/backends/__init__.py(589)compiler()-><class '...ompiler'> -> return getattr(self._cache, compiler_name) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(13)__init__() -> def __init__(self, query, connection, using): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(14)__init__() -> self.query = query (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(15)__init__() -> self.connection = connection (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(16)__init__() -> self.using = using (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(17)__init__() -> self.quote_cache = {} (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(17)__init__()->None -> self.quote_cache = {} (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(215)get_compiler()-><django....06c24850> -> return connection.ops.compiler(self.compiler)(self, connection, using) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/query.py(273)iterator() -> for row in compiler.results_iter(): (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(687)results_iter() -> def results_iter(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(691)results_iter() -> resolve_columns = hasattr(self, 'resolve_columns') (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(692)results_iter() -> fields = None (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(693)results_iter() -> has_aggregate_select = bool(self.query.aggregate_select) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1803)_aggregate_select() -> def _aggregate_select(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1809)_aggregate_select() -> if self._aggregate_select_cache is not None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1811)_aggregate_select() -> elif self.aggregate_select_mask is not None: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1818)_aggregate_select() -> return self.aggregates (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1818)_aggregate_select()->{} -> return self.aggregates (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(697)results_iter() -> if self.query.select_for_update and transaction.is_managed(self.using): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(699)results_iter() -> for rows in self.execute_sql(MULTI): (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(730)execute_sql() -> def execute_sql(self, result_type=MULTI): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(743)execute_sql() -> try: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(744)execute_sql() -> sql, params = self.as_sql() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(49)as_sql() -> def as_sql(self, with_limits=True, with_col_aliases=False): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(57)as_sql() -> if with_limits and self.query.low_mark == self.query.high_mark: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(60)as_sql() -> self.pre_sql_setup() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(19)pre_sql_setup() -> def pre_sql_setup(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(25)pre_sql_setup() -> if not self.query.tables: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(26)pre_sql_setup() -> self.query.join((None, self.query.model._meta.db_table, None, None)) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(822)join() -> def join(self, connection, always_create=False, exclusions=(), (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(855)join() -> lhs, table, lhs_col, col = connection (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(856)join() -> if lhs in self.alias_map: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(859)join() -> lhs_table = lhs (Pdb) ss NameError: name 'ss' is not defined (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(861)join() -> if reuse and always_create and table in self.table_map: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(866)join() -> t_ident = (lhs_table, table, lhs_col, col) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(867)join() -> if not always_create: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(868)join() -> for alias in self.join_map.get(t_ident, ()): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(882)join() -> alias, _ = self.table_alias(table, True) (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(630)table_alias() -> def table_alias(self, table_name, create=False): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(638)table_alias() -> current = self.table_map.get(table_name) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(639)table_alias() -> if not create and current: (Pdb) ss NameError: name 'ss' is not defined (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(645)table_alias() -> if current: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(650)table_alias() -> alias = table_name (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(651)table_alias() -> self.table_map[alias] = [alias] (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(652)table_alias() -> self.alias_refcount[alias] = 1 (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(653)table_alias() -> self.tables.append(alias) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(654)table_alias() -> return alias, True (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(654)table_alias()->('events_event', True) -> return alias, True (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(883)join() -> if not lhs: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(886)join() -> join_type = None (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(891)join() -> join = (table, alias, join_type, lhs, lhs_col, col, nullable) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(892)join() -> self.alias_map[alias] = join (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(893)join() -> if t_ident in self.join_map: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(896)join() -> self.join_map[t_ident] = (alias,) (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(897)join() -> self.rev_join_map[alias] = t_ident (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(898)join() -> return alias (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(898)join()->'events_event' -> return alias (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(27)pre_sql_setup() -> if (not self.query.select and self.query.default_cols and not (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(28)pre_sql_setup() -> self.query.included_inherited_models): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/compiler.py(29)pre_sql_setup() -> self.query.setup_inherited_models() (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(900)setup_inherited_models() -> def setup_inherited_models(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(912)setup_inherited_models() -> opts = self.model._meta (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(913)setup_inherited_models() -> root_alias = self.tables[0] (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(914)setup_inherited_models() -> seen = {None: root_alias} (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(917)setup_inherited_models() -> proxied_model = get_proxied_model(opts) (Pdb) ss * NameError: name 'ss' is not defined (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1908)get_proxied_model() -> def get_proxied_model(opts): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1909)get_proxied_model() -> int_opts = opts (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1910)get_proxied_model() -> proxied_model = None (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1911)get_proxied_model() -> while int_opts.proxy: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1914)get_proxied_model() -> return proxied_model (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/sql/query.py(1914)get_proxied_model()->None -> return proxied_model (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(919)setup_inherited_models() -> for field, model in opts.get_fields_with_model(): (Pdb) s --Call-- /Library/Python/2.7/site-packages/django/db/models/options.py(222)get_fields_with_model() -> def get_fields_with_model(self): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(228)get_fields_with_model() -> try: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(229)get_fields_with_model() -> self._field_cache (Pdb) s /Library/Python/2.7/site-packages/django/db/models/options.py(232)get_fields_with_model() -> return self._field_cache (Pdb) s --Return-- /Library/Python/2.7/site-packages/django/db/models/options.py(232)get_fields_with_model()->((<django....ield: id>, None), (<django....: leader>, None), (<django....d: place>, None), (<django....art_date>, None), (<django....ted_date>, None), (<django....activity>, None)) -> return self._field_cache (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(920)setup_inherited_models() -> if model not in seen: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(919)setup_inherited_models() -> for field, model in opts.get_fields_with_model(): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(920)setup_inherited_models() -> if model not in seen: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(919)setup_inherited_models() -> for field, model in opts.get_fields_with_model(): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(920)setup_inherited_models() -> if model not in seen: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(919)setup_inherited_models() -> for field, model in opts.get_fields_with_model(): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(920)setup_inherited_models() -> if model not in seen: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(919)setup_inherited_models() -> for field, model in opts.get_fields_with_model(): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(920)setup_inherited_models() -> if model not in seen: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(919)setup_inherited_models() -> for field, model in opts.get_fields_with_model(): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(920)setup_inherited_models() -> if model not in seen: (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(919)setup_inherited_models() -> for field, model in opts.get_fields_with_model(): (Pdb) s /Library/Python/2.7/site-packages/django/db/models/sql/query.py(927)setup_inherited_models() -> self.included_inherited_models = seen (Pdb) autoreload.py(117): except KeyboardInterrupt: autoreload.py(118): pass base.py(221): if output: --- modulename: trace, funcname: _unsettrace trace.py(80): sys.settrace(None)

}}}

Comments (0)

  1. Log in to comment