1 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
|
---|
2 | response = get_response(request)
|
---|
3 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response
|
---|
4 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
|
---|
5 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
|
---|
6 | return view_func(*args, **kwargs)
|
---|
7 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/rest_framework/viewsets.py", line 114, in view
|
---|
8 | return self.dispatch(request, *args, **kwargs)
|
---|
9 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/rest_framework/views.py", line 505, in dispatch
|
---|
10 | response = self.handle_exception(exc)
|
---|
11 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/rest_framework/views.py", line 465, in handle_exception
|
---|
12 | self.raise_uncaught_exception(exc)
|
---|
13 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
|
---|
14 | raise exc
|
---|
15 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/rest_framework/views.py", line 502, in dispatch
|
---|
16 | response = handler(request, *args, **kwargs)
|
---|
17 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/rest_framework/mixins.py", line 40, in list
|
---|
18 | page = self.paginate_queryset(queryset)
|
---|
19 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/rest_framework/generics.py", line 171, in paginate_queryset
|
---|
20 | return self.paginator.paginate_queryset(queryset, self.request, view=self)
|
---|
21 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/rest_framework/pagination.py", line 206, in paginate_queryset
|
---|
22 | self.page = paginator.page(page_number)
|
---|
23 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/core/paginator.py", line 76, in page
|
---|
24 | number = self.validate_number(number)
|
---|
25 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/core/paginator.py", line 54, in validate_number
|
---|
26 | if number > self.num_pages:
|
---|
27 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/utils/functional.py", line 48, in __get__
|
---|
28 | res = instance.__dict__[self.name] = self.func(instance)
|
---|
29 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/core/paginator.py", line 103, in num_pages
|
---|
30 | if self.count == 0 and not self.allow_empty_first_page:
|
---|
31 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/utils/functional.py", line 48, in __get__
|
---|
32 | res = instance.__dict__[self.name] = self.func(instance)
|
---|
33 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/core/paginator.py", line 97, in count
|
---|
34 | return c()
|
---|
35 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/query.py", line 411, in count
|
---|
36 | return self.query.get_count(using=self.db)
|
---|
37 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/sql/query.py", line 517, in get_count
|
---|
38 | number = obj.get_aggregation(using, ['__count'])['__count']
|
---|
39 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/sql/query.py", line 485, in get_aggregation
|
---|
40 | outer_query.add_subquery(inner_query, using)
|
---|
41 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/sql/subqueries.py", line 162, in add_subquery
|
---|
42 | self.subquery, self.sub_params = query.get_compiler(using).as_sql(with_col_aliases=True)
|
---|
43 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 498, in as_sql
|
---|
44 | extra_select, order_by, group_by = self.pre_sql_setup()
|
---|
45 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 55, in pre_sql_setup
|
---|
46 | self.setup_query()
|
---|
47 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 46, in setup_query
|
---|
48 | self.select, self.klass_info, self.annotation_col_map = self.get_select()
|
---|
49 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 267, in get_select
|
---|
50 | sql, params = col.select_format(self, sql, params)
|
---|
51 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/expressions.py", line 385, in select_format
|
---|
52 | if hasattr(self.output_field, 'select_format'):
|
---|
53 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/utils/functional.py", line 48, in __get__
|
---|
54 | res = instance.__dict__[self.name] = self.func(instance)
|
---|
55 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/expressions.py", line 266, in output_field
|
---|
56 | output_field = self._resolve_output_field()
|
---|
57 | File "/home/matthew/.virtualenvs/rest-framework-tutorial/lib/python3.6/site-packages/django/db/models/expressions.py", line 306, in _resolve_output_field
|
---|
58 | source.__class__.__name__,
|
---|
59 | django.core.exceptions.FieldError: Expression contains mixed types: MoneyField, IntegerField. You must set output_field.
|
---|
60 |
|
---|