I too checking for similar thing. Need to store a list of integers/
floats in the model. When we find existing form fields as inadequate,
we can define our own fields. What about following the same way here
for model fields too?

On Dec 31, 9:40 am, schwim <gsch...@gmail.com> wrote:
> I'm trying to build a model that will store the counts of each of 10
> possible choices, e.g.:
>
>     v1 = models.IntegerField(default=0)
>     v2 = models.IntegerField(default=0)
>     v3 = models.IntegerField(default=0)
>     ...
>     v10 = models.IntegerField(default=0)
>
> I'd prefer to represent this as an array rather than 10 separate
> fields.  I looked at the CommaSeparatedIntegerField as an alternative,
> but I want to explicitly state that there are 10 entries available per
> instance.
>
> Any suggestions on how this can be done, or perhaps a better way to
> solve this puzzle?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to