sorry,my english is not good my urls.py is from django.conf.urls import include, url, patterns from django.contrib import admin
urlpatterns = [ url(r'^admin/', include(admin.site.urls)), ] urlpatterns += patterns('bullet.views.noticeview', (r'^$', 'notice'), (r'^board', 'board'), ) and this is my views code def notice(request): logger = logging.getLogger('school') logger.info("ko ") board_list=board.objects.using("default").all() return render_to_response('index.html',locals()) def board(request): t = loader.get_template("index.html") response_data = {} response_data["result"] = "Y" board_list=board.objects.using("default").all() response_data["content_html"] = t.render(Context({'board_list':board_list})) return HttpResponse(json.dumps(response_data), content_type="application/json") when i run localhost:82 it will run notice and goto index.html but when i run localhost:82/board it will return 404 not found and i try to change the code def board to this def board(request): logger = logging.getLogger('school') logger.info("ko ") board_list=board.objects.using("default").all() return render_to_response('index.html',locals()) just same of notice it still return 404 not found the environment is ubuntu+nginx+django 1.8.13 and i try build it on the environment windows2008+apache+django1.8.7 both notice and board can work fine(windows use port:83) <https://lh3.googleusercontent.com/-vHsh2smUHTw/VzBEbOdJP-I/AAAAAAAAB20/Kfm8BmWX0lYm_tlRYEPgSWUxUHEWUDUzwCLcB/s1600/windowsapache.png> so i don't understand why ubuntu+nginx will return 404 not found Gergely Polonkai於 2016年5月9日星期一 UTC+8上午1時36分49秒寫道: > > What do you mean it doesn't work? What error message you get? Are you sure > it is provided by Django and not the webserver? > > Also, GMail is marking your message as a possible malware; consider > pasting your urls.py inline instead of an attachment. > >> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c23eb219-a5ba-4353-b938-79c478783921%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.