1

Django アプリケーションにリクエストを送信しましたが、この質問のタイトルに記載されているエラーが表示されます。インポート エラーの概念は理解していますが、なぜこのエラーが発生するのかわかりません。

ここに完全なトレースバックがあります

Traceback:
File "/home/chaz/dev/envs/payments_bss_com/local/lib/python2.7/site-packages/django/core/handlers/base.py" in   
get_response
  89.                     response = middleware_method(request)
File "/home/chaz/dev/envs/payments_bss_com/local/lib/python2.7/site-packages/django/middleware/common.py" in   
process_request
  67.             if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
File "/home/chaz/dev/envs/payments_bss_com/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in is_valid_path
  531.         resolve(path, urlconf)
File "/home/chaz/dev/envs/payments_bss_com/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  420.     return get_resolver(urlconf).resolve(path)
File "/home/chaz/dev/envs/payments_bss_com/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  298.             for pattern in self.url_patterns:
File "/home/chaz/dev/envs/payments_bss_com/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  328.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/chaz/dev/envs/payments_bss_com/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in 
urlconf_module
  323.             self._urlconf_module = import_module(self.urlconf_name)
File "/home/chaz/dev/envs/payments_bss_com/local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)

Exception Type: ImportError at /23
Exception Value: No module named Python

私の URLConf

from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^(?P<payment_id>\w+)/$', 'main.views.process_payment'),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls),
)

urlpatterns += staticfiles_urlpatterns()
4

1 に答える 1

2

ROOT_URL が誤って に変更されました<app_name>.Python。上記の最初のコメントにリンクされている質問には、同様の(ただし異なる)問題がありました。

于 2013-01-11T21:32:41.903 に答える