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
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
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
:
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:
> &
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
5 matches
Mail list logo