Hi, I'm in the process of learning django by creating a simple application for use at work, I'm using the djangobook's tutorials as guidlines for my own app. As far as I can tell, everything below is correct however when django loads the page in the browser there is no data from within the FOR loop. Any assistance would be most appreciated!
Thanks! Dan Code follows: URLS.PY from django.conf.urls.defaults import * from django.views.generic import list_detail from mojo.views import * from mojo.audit.models import * from django.contrib import admin admin.autodiscover() line_list = {'queryset' : Line.objects.all(), } urlpatterns = patterns('', (r'^lines/$', list_detail.object_list, line_list), ) line_list.html {% extends 'base.html' %} {% block content %} <ul> {% for line in line_list %} <li>{{line.line_number}}<b><---></b> {{line.title}}</li> {% endfor %} </ul> {% endblock %} MODELS.py class Line(models.Model): line_id = models.AutoField(primary_key=True, unique = True, db_column ='line_id') lot_id = models.ForeignKey(Lot, db_column='lot_id') line_number = models.IntegerField() material = models.CharField(max_length=3) minor_material = models.CharField(max_length=3) child_survey = models.CharField(max_length=2, blank=True) copy_type = models.CharField(max_length=2) pages = models.IntegerField() copies = models.IntegerField() title = models.TextField() def __unicode__(self): return u'%d' % (self.line_number) --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---