質問編集履歴

1

追記

2020/05/05 02:12

投稿

Mamiya_tom
Mamiya_tom

スコア17

test CHANGED
File without changes
test CHANGED
@@ -113,3 +113,81 @@
113
113
  そもそもの書き方、考え方、が間違っているなどありましたご指摘いただける幸いです。
114
114
 
115
115
  よろしくお願いいたします。
116
+
117
+
118
+
119
+ #追記
120
+
121
+ `'NoneType' object is not iterable`のエラー内容を追記させていただきました。
122
+
123
+ ```error
124
+
125
+ None
126
+
127
+ Internal Server Error: /tags_post/
128
+
129
+ Traceback (most recent call last):
130
+
131
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
132
+
133
+ response = get_response(request)
134
+
135
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
136
+
137
+ response = self.process_exception_by_middleware(e, request)
138
+
139
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
140
+
141
+ response = wrapped_callback(request, *callback_args, **callback_kwargs)
142
+
143
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/views/generic/base.py", line 71, in view
144
+
145
+ return self.dispatch(request, *args, **kwargs)
146
+
147
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/views/generic/base.py", line 97, in dispatch
148
+
149
+ return handler(request, *args, **kwargs)
150
+
151
+ File "/Users/name/Desktop/study/zigzag2/register/views.py", line 391, in get
152
+
153
+ context['all_tag_post_list'] = Item.objects.filter(tags__name__in=tag).distinct()
154
+
155
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/manager.py", line 82, in manager_method
156
+
157
+ return getattr(self.get_queryset(), name)(*args, **kwargs)
158
+
159
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/query.py", line 904, in filter
160
+
161
+ return self._filter_or_exclude(False, *args, **kwargs)
162
+
163
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/query.py", line 923, in _filter_or_exclude
164
+
165
+ clone.query.add_q(Q(*args, **kwargs))
166
+
167
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1350, in add_q
168
+
169
+ clause, _ = self._add_q(q_object, self.used_aliases)
170
+
171
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1377, in _add_q
172
+
173
+ child_clause, needed_inner = self.build_filter(
174
+
175
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1311, in build_filter
176
+
177
+ condition = self.build_lookup(lookups, col, value)
178
+
179
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1165, in build_lookup
180
+
181
+ lookup = lookup_class(lhs, rhs)
182
+
183
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/lookups.py", line 22, in __init__
184
+
185
+ self.rhs = self.get_prep_lookup()
186
+
187
+ File "/Users/name/Desktop/study/zigzag2/myvenv/lib/python3.8/site-packages/django/db/models/lookups.py", line 217, in get_prep_lookup
188
+
189
+ for rhs_value in self.rhs:
190
+
191
+ TypeError: 'NoneType' object is not iterable
192
+
193
+ ```