[EMAIL PROTECTED] wrote:

> suppose i have a model with 2 keywords like
>
> class Test(models.Model):
>        result_id = models.IntegerField(maxlength=10)
>       lab_id = models.IntegerField(maxlength=10)
>
> is there a method to extract all the keywords from this class.
> So in this example i actually want [result_id,lab_id]

 I dont see any 'keywords' here. Just some integer fields. Are you sure
you dont really want to make it a CharField with some "choices"
argument?

class Foo(models.Model):
    GENDER_CHOICES = (
        ('M', 'Male'),
        ('F', 'Female'),
    )
    gender = models.CharField(maxlength=1, choices=GENDER_CHOICES)

Barry


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

Reply via email to