going through the django tutorial i found error while executing the python manage.py runserver.The error is attached below

2018-05-06 Thread Avitab Ayan Sarmah
views.py: from django.shortcuts import get_object_or_404, render from . models import Question def index(request): latest_question_list = Question.objects.order_by('-pub_date')[:5] context = {'latest_question_list': latest_question_list} return render(request, 'polls/index.html', context) def d

Re: I know this question has been asked before, but I haven't found an answer that solves my situation. I'm looking at the Django tutorial, and I've set up the first URLs exactly as the tutorial has i

2018-04-23 Thread Avitab Ayan Sarmah
8 at 11:00:27 PM UTC+5:45, Avitab Ayan Sarmah > wrote: >> >> polls/views.py >> >> from django.http import HttpResponse >> >> def index(request): >> return HttpResponse("Hello, world. You're at the polls index.") >> >> >>

I know this question has been asked before, but I haven't found an answer that solves my situation. I'm looking at the Django tutorial, and I've set up the first URLs exactly as the tutorial has it,

2018-04-22 Thread Avitab Ayan Sarmah
polls/views.py from django.http import HttpResponse def index(request): return HttpResponse("Hello, world. You're at the polls index.") polls/urls.py from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'),] mysite/urls.py from django.con