django templates

add to

STATICFILES_DIRS = ( os.path.join(BASE_DIR,’static’), )
TEMPLATE_DIRS = ( os.path.join(BASE_DIR,’templates’), )

add to

from django.shortcuts import render

# Create your views here.
from django.http import HttpResponse
from todo.models import Task

def index(request): a=Task.objects.all() context={‘task_text’:a} return render(request, ’todo/b.html’ ,context)

note:where todo is application name and task is class and task_text is object

add to

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

urlpatterns = [ url(r’^admin/’, include(, url(r’^$’,views.index),

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.