Django 1.11.17 Tutorial (part2) – Create Polls App

In part 1 (Create a Django 1.11.17 Environment) of this django tutorial how to create a django webapp, I set up a Django 1.11.17 project in PyCharm. In this post, I will set up and configure the polls application. This is the start of creating a first django webapp.

Create Polls App In PyCharm

  • Launch PyCharm
  • Click on Tools->run Task
  • In the console, type startapp polls, polls\, mysite\

A view is a “type” of Web page in your Django application that generally serves a specific function and has a specific template.

See the official django polls tutorial for more.Otherwise just add the following code into the following files:


from django.http import HttpResponse

def index(request):
    return HttpResponse("Hello, world. You're at the polls index.")


from django.conf.urls import url
from . import views
urlpatterns = [
    url(r'^$', views.index, name='index'),


from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^polls/', include('polls.urls')),


Again, do menu->Tools->Run Task, then call runserver in the console (if the server isn’t already running).

Enter “” and you should see “Hello, world. You’re at the polls index.”

Pin It on Pinterest

Share This