On Mon, Jun 9, 2008 at 10:42 PM, Silfheed <[EMAIL PROTECTED]> wrote:

>
> Heyas
>
> So we have a table which makes use of mysql's SET datatype to store
> the status of a page ('active','inappropriate','optout') with the
> status being any combination of the three.  This helps us keep the
> complexity of our schemas down since we just need one column (rather
> than 3 tables) to represent our status.  Unfortunatly, Django doesnt
> have anything in django.models to handle sets.  It does have
> CommaSeparatedIntegerField, but it means having to store ints rather
> than more descriptive texts.
>
> Does anyone else out there happen to be using mysql SET+django and
> have an elegant method for handling the situation?
>

I don't know of anything built-in, but you can create your own custom model
fields:

http://www.djangoproject.com/documentation/custom_model_fields/

which should allow you to build an elegant solution.

Karen

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to