Re: "Dynamyc" modells
On 03/12/2012 03:34 PM, Ervin Hegedüs wrote:
> The main problem is the PromoList is _dynamyc_ - it means all
> administrator on admin site should add new PromoList, without me
> :), so I can't derivate all subclass in code...
>
You can't dynamically create database tables on the fly. That would
require real-time schema migrations, which would be a bad idea even if
you got it to work.
Why not make one model, give it an extra field for the description of
what type of promo it is, and just add records to the same model for
each "type" of promo code?
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home