i have a problem
from django.db import models # Create your models here. 

class Post(models.Model): 
      headline = models.CharField(max_length=200) 
      slug = models.SlugField(max_length=60) 
      pub_date = models.DateField() 
      photo = models.ImageField(upload_to='static/blog', blank=True) 
      content = models.TextField()
      reporter = models.CharField(max_length=100)

 def __unicode__(self): return 
self.headline

views  


from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.views import generic

from blogs.models import Post

class IndexNews(generic.ListView):
    template_name = 'index.html'
    context_object_name = 'news_list'

    def get_queryset(self):
        """Return the last five published polls."""
        return Post.objects.order_by('-pub_date')[:5]

class NewsDetail(generic.DetailView):
    model = Post
    template_name = 'news.html'
    context_objects_name = 'news_details'

{% extends 'base.html' %}
{% block content %}
<div id="news"> 
<h1> News Updates </h1>
  <ul>
    {% for news in news_list %}
        <li><a href="/blogs/{{ news.id }}/">{{ news.headline }}</a></li>
    {% endfor %}
    </ul>
</div>
{% endblock %}


when i had a  news update on the admin page it list on the web browser 
using the heading which is a link

how to i create a template so that when i click on the heading link it 
ouputs the entire information a different page 

i am a little bit confused here 

please need help

>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/826013b4-1c06-44d3-b1a7-f2105b4ac888%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to