Hi guys,

I'm trying to make a generic view to see some data, and I'm having
some trouble.

I have some objects already in the database for the model I'm trying
to generate this for.

Here's my urls.py:
#=====================
from django.conf.urls.defaults import *
from django.views.generic.list_detail import object_list
from mysite.myapp.models import Competitor

competitor_list_info = {
    'queryset' :   Competitor.objects.all(),
    'allow_empty': True,
        'template_name': 'competitor_list.html'
}

urlpatterns = patterns('',
         #snip#
         (r'competitors/$', object_list, competitor_list_info)
        )
#=====================


And here's my simple template, competitor_list.html:
#=====================
{% extends "base.html" %}
{% block content %}
<ul class="objectlist">
{% for choice in field.choices %}
<li class="{% cycle odd,even %}"><a
href="{{ choice.url }}">{{ choice.label|escape }}</a></li>
{% endfor %}
</ul>
{% endblock %}
#=====================

And I get no output...

What am I missing here? Can someone point me in the right direction? I
can't seem to find any good documentation on writing templates for
generic views.

Thanks,

Mike


--~--~---------~--~----~------------~-------~--~----~
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