from django db import models from tw mysite models import New from dja

1
2
3
4
5
6
7
8
9
from django.db import models
from tw.mysite.models import New
from django.shortcuts import render_to_response
def Newa(request):
news_list = New.objects.all()
print news_list
return render_to_response("mysite/index.html", {'news':news_list})