from django db import models from tw news models import New from djang

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