On Jul 21, 1:56 am, Andy <[email protected]> wrote: > I have N models that are identical except the model names (i.e. they > all have the same attributes, methods): > > MyModel0, MyModel1, MyModel2, ... > > Normally I'd need to type out the model definitions for those N models > by hand inside models.py. > > Is there a way to generate the N model definitions programatically > instead of manually?
I'm not completely sure what you're trying to do, but I have a blog entry on creating temporary models programmatically - it might help you: http://blog.roseman.org.uk/2010/04/13/temporary-models-django/ -- DR. -- 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.

