Could not import photocomp.apps.news.views.news. View does not exist in module photocomp.apps.news.views.
/ news /にビューがないと表示されますが、ここにあります。
urls.py
url(r'^news/', include('photocomp.apps.news.urls')),
urls.py(ニュース用)
from django.conf.urls import patterns, include, url
from django.conf import settings
urlpatterns = patterns('',
url(r'^submit/$', 'photocomp.apps.news.views.submit'),
url(r'^success/$', 'photocomp.apps.news.views.success'),
url(r'^$', 'photocomp.apps.news.views.news'),
)
settings.py
INSTALLED_APPS = (
'photocomp.apps.news',
)
そしてここに私の見解があります:
def news(request):
news = News_Entry.objects.all().order_by('-publication')
return render_to_response('news/news.html', {'news':news},context_instance=RequestContext(request))
この問題の原因は何ですか?私はアプリの残りの部分でそれを持っていません。