My new model class works great. It returns my answer, but in a query
set, and the table is set up only to return one element in the
QuerySet due to the indexes. My problem is how to extract the data
from that QuerySet. repr() does not work, because the model class has
no repr method.

How do I extract the data?

# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
#     * Rearrange models' order
#     * Make sure each model has one field with primary_key=True
# Feel free to rename the models, but don't rename db_table values or
field names.
#
# Also note: You'll have to insert the output of 'django-admin.py
sqlcustom [appname]'
# into your database.

from django.db import models

class EptInv(models.Model):
    part_num = models.CharField(max_length=60, blank=True)
    ept_type = models.IntegerField(primary_key=True)
    inv_id = models.IntegerField(primary_key=True)
    load_date = models.DateField(null=True, blank=True)
    class Meta:
        db_table = u'ept_inv'

    def __unicode__(self):
        return str(self.inv_id)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to