and here is urls from myapp

from django.conf.urls.defaults import *
from django.views.generic import list_detail, date_based,
create_update
from books.models import Publisher, Author, Book

author_list_info = {
    'queryset':Author.objects.all(),
    "template_object_name" : "author",
    "extra_context":{'name':'john', 'lname':'doe'}
    }


urlpatterns = patterns('',
    # we'll add URL patterns here
    (r'author_list.html$', list_detail.object_list, author_list_info),
)




On Oct 11, 7:49 pm, Gigs_ <[EMAIL PROTECTED]> wrote:
> so if this is my template for that list
> <html>
> <head>
>
> <title>my template</title>
>
> </head>
> <body>
> <h1>my books app</h1>
> <ul>
> {% for name in "what goes here" %}
> <li>{{ name }}</li>
> {% endfor %}
> </ul>
>
> On Oct 11, 7:47 pm, Gigs_ <[EMAIL PROTECTED]> wrote:
>
> > so i cant get list from models?
> > from Author.objects.all()
>
> > On Oct 11, 4:03 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > > the list you want to use in template must be in template context. use
> > > "extra_context" value
>
> > > On 11 окт, 17:31, Gigs_ <[EMAIL PROTECTED]> wrote:
>
> > > > hi all
>
> > > > im learning django with djangobook.com
> > > > im stuck in chapter 9 at Lists of objects.
> > > > i just cant get any list of objects in my template.
>
> > > > what should i put in template to make this work?
>
> > > > thanks!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to