Re: Using South HOWTO create an instance of a model from a different app during DataMigration

2011-08-13 Thread Chintan Tank
*UPDATE:* * * I was able to resolve the problem by looking up the contenttype manually so, ct = orm['contenttypes.ContentType'].*objects.*get(app_label="blog", model="Post") Thanks Tom & Andrew (at south user listserv) for helping with this. On Sat, Aug 13, 2011 at 1:14 PM, Chintan Tank wrote:

Re: Using South HOWTO create an instance of a model from a different app during DataMigration

2011-08-13 Thread Chintan Tank
Tom, I tried looking up the content_type and then using it, but it still throws errors. *1. I tried* ct = ContentType.objects.get_for_model(Post) chapter = orm.Chapter(rank=1, content_type=ct, object_id=blog.id) *It gave error,* ValueError: Cannot assign "": "Chapter.content_type" must be a "Co

Re: Using South HOWTO create an instance of a model from a different app during DataMigration

2011-08-08 Thread Chintan Tank
Tom, Thanks for your reply. I will try it out and post back the results. On Mon, Aug 8, 2011 at 10:25 AM, Tom Evans wrote: > On Mon, Aug 8, 2011 at 3:06 PM, Chintan Tank > wrote: > > (sorry for duplicate I have already posted on stackoverflow.com > > > http://goo.gl/I7Jj6 ) > > > > I need to pe

Re: Using South HOWTO create an instance of a model from a different app during DataMigration

2011-08-08 Thread Tom Evans
On Mon, Aug 8, 2011 at 3:06 PM, Chintan Tank wrote: > (sorry for duplicate I have already posted on stackoverflow.com > > http://goo.gl/I7Jj6 ) > > I need to perform a datamigration of a model Answer in app Question. > In that script there is a dependency such that I need to create an > instance o

Using South HOWTO create an instance of a model from a different app during DataMigration

2011-08-08 Thread Chintan Tank
(sorry for duplicate I have already posted on stackoverflow.com > http://goo.gl/I7Jj6 ) I need to perform a datamigration of a model Answer in app Question. In that script there is a dependency such that I need to create an instance of a model Chapter which is in the app Journal. So, I coded it as