C:\tmp\djt\mysite>manage shell
Could not open file <shell> for safe execution.
Python 2.4 (#60, Feb  9 2005, 19:03:27) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.7.1.fix1 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: from mytest.models import *

In [2]: m = mymodel.objects.get(id=1)

In [3]: m
Out[3]: <mymodel: mymodel object>

In [4]: m.submodel.count()
---------------------------------------------------------------------------
exceptions.TypeError                                 Traceback (most recent ca
 last)

C:\tmp\djt\mysite\<ipython console>

C:\Python24\lib\site-packages\django\db\models\manager.py in count(self)
     52
     53     def count(self):
---> 54         return self.get_query_set().count()
     55
     56     def dates(self, *args, **kwargs):

C:\Python24\lib\site-packages\django\db\models\query.py in count(self)
    184         counter._limit = None
    185         counter._select_related = False
--> 186         select, sql, params = counter._get_sql_clause()
    187         cursor = connection.cursor()
    188         if self._distinct:

C:\Python24\lib\site-packages\django\db\models\query.py in _get_sql_clause(sel

    407
    408         # Convert self._filters into SQL.
--> 409         tables2, joins2, where2, params2 = self._filters.get_sql(opts)
    410         tables.extend(tables2)
    411         joins.update(joins2)

C:\Python24\lib\site-packages\django\db\models\query.py in get_sql(self, opts)
    538         tables, joins, where, params = [], SortedDict(), [], []
    539         for val in self.args:
--> 540             tables2, joins2, where2, params2 = val.get_sql(opts)
    541             tables.extend(tables2)
    542             joins.update(joins2)

C:\Python24\lib\site-packages\django\db\models\query.py in get_sql(self, opts)
    587
    588     def get_sql(self, opts):
--> 589         return parse_lookup(self.kwargs.items(), opts)
    590
    591 class QNot(Q):

C:\Python24\lib\site-packages\django\db\models\query.py in parse_lookup(kwarg_it
ems, opts)
    695                 raise TypeError, "Cannot parse keyword query %r" % kwarg

    696
--> 697             tables2, joins2, where2, params2 = lookup_inner(path, clause
, value, opts, opts.db_table, None)
    698             tables.extend(tables2)
    699             joins.update(joins2)

C:\Python24\lib\site-packages\django\db\models\query.py in lookup_inner(path, cl
ause, value, opts, table, column)
    798         raise
    799     else: # No match found.
--> 800         raise TypeError, "Cannot resolve keyword '%s' into field" % name

    801
    802     # Check to see if an intermediate join is required between current_t
able

TypeError: Cannot resolve keyword 'mymodel' into field

