出错信息
Traceback: File "E:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "E:\learngit\store\auto_sale\views.py" in add_to_shop_car 82. size_name=size.name, color_name=size.name) File "E:\Python27\lib\site-packages\django\db\models\manager.py" in manager_method 127. return getattr(self.get_queryset(), name)(*args, **kwargs) File "E:\Python27\lib\site-packages\django\db\models\query.py" in get_or_create 405. return self.get(**lookup), False File "E:\Python27\lib\site-packages\django\db\models\query.py" in get 325. clone = self.filter(*args, **kwargs) File "E:\Python27\lib\site-packages\django\db\models\query.py" in filter 679. return self._filter_or_exclude(False, *args, **kwargs) File "E:\Python27\lib\site-packages\django\db\models\query.py" in _filter_or_exclude 697. clone.query.add_q(Q(*args, **kwargs)) File "E:\Python27\lib\site-packages\django\db\models\sql\query.py" in add_q 1309. clause, require_inner = self._add_q(where_part, self.used_aliases) File "E:\Python27\lib\site-packages\django\db\models\sql\query.py" in _add_q 1337. allow_joins=allow_joins, split_subq=split_subq, File "E:\Python27\lib\site-packages\django\db\models\sql\query.py" in build_filter 1199. lookups, value) File "E:\Python27\lib\site-packages\django\db\models\fields\related.py" in get_lookup_constraint 1756. lookup_class(target.get_col(alias, source), val), AND) File "E:\Python27\lib\site-packages\django\db\models\lookups.py" in __init__ 101. self.rhs = self.get_prep_lookup() File "E:\Python27\lib\site-packages\django\db\models\lookups.py" in get_prep_lookup 139. return self.lhs.output_field.get_prep_lookup(self.lookup_name, self.rhs) File "E:\Python27\lib\site-packages\django\db\models\fields\__init__.py" in get_prep_lookup 727. return self.get_prep_value(value) File "E:\Python27\lib\site-packages\django\db\models\fields\__init__.py" in get_prep_value 985. return int(value) Exception Type: TypeError at /add_to_shop_car/ Exception Value: int() argument must be a string or a number, not 'ShopCar' Request information: GET: No GET dataTraceback: File "E:\Python27\lib\site