Migrating Many-To-Many Relationship

2010-01-12 Thread David Nolen
When migrating an existing db how do you create a proper join table for a ManyToMany field. I think I've got it mostly worked out except for the bit that looks like this in Django generated SQL: CREATE TABLE `blog_posts_authors` ( `id` int(11) NOT NULL AUTO_INCREMENT, `post_id` int(11) NOT

Re: Foreign Key Admin UI Error (from a new user)

2009-10-27 Thread David Nolen
Ahh I see now I needed to define ArtBaseModel as an abstract base class. On Oct 24, 7:06 pm, David Nolen <dnolen.li...@gmail.com> wrote: > Thanks for the reply. The base model just looks like this: > > class ArtBaseModel(models.Model): >     created = mo

Re: Foreign Key Admin UI Error (from a new user)

2009-10-27 Thread David Nolen
ans...@googlemail.com> wrote: > On Fri, 2009-10-23 at 13:22 -0700, David Nolen wrote: > > My admin looks something like the following- > > > class TitleInline(admin.TabularInline): > >     model = Title > >     extra = 1 > > > class WorkAdmin(admi

Re: Foreign Key Admin UI Error (from a new user)

2009-10-24 Thread David Nolen
: self.created = datetime.datetime.today() self.modified = datetime.datetime.today() super(ArtBaseModel, self).save() On Sat, Oct 24, 2009 at 7:56 AM, Tom Evans <tevans...@googlemail.com> wrote: > > On Fri, 2009-10-23 at 13:22 -0700, David Nolen wrote: > &

Foreign Key Admin UI Error (from a new user)

2009-10-23 Thread David Nolen
My admin looks something like the following- class TitleInline(admin.TabularInline): model = Title extra = 1 class WorkAdmin(admin.ModelAdmin): inlines = [TitleInline] admin.site.register(Work, WorkAdmin) My models look something like this- class Work(ArtBaseModel): def