내가 모델 한 번 양식을 작성-과 유효한 것으로 간주되었다의 인스턴스를 생성하는 "업로드"보기 한을 통해 장고에 다른 하나 개의보기에서 개체를 전달 위쪽 화살표, 내 모델의 인스턴스를 다음보기로 전달하고 싶습니다. 구성보기는 다음과 같습니다 :이 같은HttpResponseRedirect를
내보기def configure(request, pattern):
...
모두 한 URL을 그러나
url(r'^upload/$','CrossStitch.views.upload', name='upload'),
url(r'^configure/$','CrossStitch.views.configure', name='configure'),
,이 오류 받고 있어요 :
TypeError at /CrossStitch/upload/
_reverse_with_prefix() argument after * must be a sequence, not Pattern
Request Method: POST
Request URL: http://127.0.0.1:8000/CrossStitch/upload/
Django Version: 1.4.5
Exception Type: TypeError
Exception Value:
_reverse_with_prefix() argument after * must be a sequence, not Pattern
Exception Location: /usr/lib/python2.7/dist-packages/django/core/urlresolvers.py in reverse, line 476
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:
['/home/stacey/work/Django/StaceyAnne',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7']
Server time: Wed, 4 Sep 2013 15:22:12 +0200
가 어떻게이 통과 할을 하나의보기에서 다른보기로 내 개체의 인스턴스가 올바르게 나타 납니까?
나는 이것을 시도해 보았고 "Reverse for 'configure'를 '(,)'인수와 '{' '를 찾을 수 없음' –
stanri
. 누군가가/configure/<과거 ID를 수동으로 입력하면, 그 페이지를 볼 수 있습니까? – stanri
이 mabye는 구성보기가 인수, 즉 정규식 패턴 ... – Jingo