ticket #6755 closed: Model Inheritance doesn't work in the admin.

2008-07-22 Thread Andre Meyer
hi all wow, ticket #6755 is closed! so, just tried it out and got an error, oh my dear! is it me or is there still a problem? here is the code (simplified) *model.py* class Item(models.Model): pass class Note(models.Model): text =

Re: Model Inheritance in new-forms admin

2008-07-18 Thread Russell Keith-Magee
On Fri, Jul 18, 2008 at 7:41 PM, cschand <[EMAIL PROTECTED]> wrote: > > Hi Russ >The problem is not solved in the ticket No - that's because it's a bug report. When the bug is fixed, the ticket will be closed. Yours, Russ Magee %-) --~--~-~--~~~---~--~~ You

Re: Model Inheritance in new-forms admin

2008-07-18 Thread cschand
Hi Russ The problem is not solved in the ticket Satheesh On Jul 18, 4:13 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Fri, Jul 18, 2008 at 7:00 PM, cschand <[EMAIL PROTECTED]> wrote: > > > When I tried model inheritance in new-form

Re: Model Inheritance in new-forms admin

2008-07-18 Thread Andre Meyer
hi i had (and still have) the same problem<http://groups.google.com/group/django-users/browse_frm/thread/6d2712678852f20c/59ee10780ea00b61?lnk=gst=model+inheritance+and+admin#59ee10780ea00b61> . really hope this gets fixed (be)for(e) 1.0; patches seem to be available, so it can't b

Re: Model Inheritance in new-forms admin

2008-07-18 Thread Russell Keith-Magee
On Fri, Jul 18, 2008 at 7:00 PM, cschand <[EMAIL PROTECTED]> wrote: > > When I tried model inheritance in new-forms admin, I faced some > problems ... > What is wrong with me? You haven't checked the tickets: http://code.djangoproject.com/ticket/6755

Model Inheritance in new-forms admin

2008-07-18 Thread cschand
When I tried model inheritance in new-forms admin, I faced some problems The below is the code i tried class Reporter(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) email = models.EmailField() def __str__(self

Re: Model inheritance problem in admin

2008-07-14 Thread David
from the admin pages, I get COPIES of what I'm > > saving. When I save them through the API, I don't get the duplicates. > > I'd like to know if I'm doing something wrong or misunderstanding > > something. > > You're assuming that model inheritance is supported in the

Re: Model inheritance problem in admin

2008-07-14 Thread Malcolm Tredinnick
're assuming that model inheritance is supported in the admin interface. It isn't. That would be the main problem here. It's just not worth doing all the work required to change existing admin when newforms-admin is arriving so soon. So you'll just have to wait a bit (or not use the admin for inherited model

Re: Restriction of Model Inheritance - mixing multi table and abstract

2008-07-01 Thread zobbo
On Jul 1, 12:58 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > I don't have time to look at this at the moment (I'm up to my armpits in > somebody else's problem), but this looks like a bug. Would you mind to > open a ticket and include your example so it doesn't get lost? You can >

Re: Restriction of Model Inheritance - mixing multi table and abstract

2008-07-01 Thread Malcolm Tredinnick
On Tue, 2008-07-01 at 12:53 +0100, Ian J Cottee wrote: > Take this simple models file. If I try and do > > pi = PlayableItem(funfactor=33,code='PS2',description='Play station > 2') > > I get > > "TypeError: 'code' is an invalid keyword argument for this function" > > If PlayableItem

Restriction of Model Inheritance - mixing multi table and abstract

2008-07-01 Thread Ian J Cottee
Take this simple models file. If I try and do pi = PlayableItem(funfactor=33,code='PS2',description='Play station 2') I get "TypeError: 'code' is an invalid keyword argument for this function" If PlayableItem inherits directly from Item, this does not happen. Is there some rule I'm breaking

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-21 Thread felix
regarding Model Inheritance and the admin I've checked out the newforms-admin branch now. Its wonderful! Lots of great solutions. As of the other day its only a few revisions away from the trunk. (the trunk is being merged into newforms-admin) with Model inheritance the pointer field

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-19 Thread felix
I second that. I've just spent the day quite happily refactoring my app to use nifty model inheritance ... and the admin doesn't work. whoops. I think this should be stated in the docs for sure. On Jun 2, 4:44 pm, ekellner <[EMAIL PROTECTED]> wrote: > Is newforms-admin any closer

Re: Extending User model with model inheritance?

2008-06-13 Thread James Bennett
On Fri, Jun 13, 2008 at 10:54 PM, meppum <[EMAIL PROTECTED]> wrote: > With the query refactoring branch being merged to the trunk I wanted > to finally move some of the data I had put on my user profiles to a > derrived user model. I didn't see this mentioned in the documentation > and I wanted

Re: Model inheritance and primary keys

2008-06-03 Thread ekellner
On Tue, Jun 3, 2008 at 2:49 PM, Etienne Robillard <[EMAIL PROTECTED]> wrote: > I agree with you, and think this should be better expressed. Perhaps without > words which refers to abstract C++ concepts like pointers, and using a > vocabulary > more adapted to Python. At least this would be more

Re: Model inheritance and primary keys

2008-06-03 Thread Etienne Robillard
On Tue, 3 Jun 2008 12:33:25 +0200 ekellner <[EMAIL PROTECTED]> wrote: > > As I was looking at model inheritance with admin recently, I came > across this issue: > http://code.djangoproject.com/ticket/6755 > > I'm thinking now that the underlying issue that I'm seei

Model inheritance and primary keys

2008-06-03 Thread ekellner
As I was looking at model inheritance with admin recently, I came across this issue: http://code.djangoproject.com/ticket/6755 I'm thinking now that the underlying issue that I'm seeing, and what the patch in 6755 is fixing, doesn't actually have anything to do with newforms at all. I think

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-02 Thread ekellner
y closer to being merged? This group's archives says that it's quite stable and has been for some time, but I don't have the impression that the merge is going to be easy or soon. > It does seem to me that the doc should mention that Admin doesn't currently > support model inheritance (care to

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-02 Thread Karen Tracey
On Mon, Jun 2, 2008 at 8:19 AM, Elizabeth Kellner <[EMAIL PROTECTED]> wrote: > On 28 Mai, 14:15, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > Model inheritance is not supported by the admin: > > > > http://code.djangoproject.com/ticket/6755 > &g

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-02 Thread Elizabeth Kellner
On 28 Mai, 14:15, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Model inheritance is not supported by the admin: > > http://code.djangoproject.com/ticket/6755 > > There's a patch on that ticket, but I have no idea if it works, solves the > complete problem, etc.

Re: model inheritance and admin (qs-rf & nf-a)

2008-05-28 Thread Andre Meyer
t; why? is the model wrong or is there a bug in qs-rf or nf-a? or am i just >> not getting it? >> >> the code is >> here<http://code.google.com/p/pastiche/source/browse/trunk/dada/models.py> >> . >> > > Model inheritance is not supported by the admin: >

Re: model inheritance and admin (qs-rf & nf-a)

2008-05-28 Thread Karen Tracey
On Wed, May 28, 2008 at 7:27 AM, Andre Meyer <[EMAIL PROTECTED]> wrote: > hi all > > working with the newforms-admin branch i tried to build a model using model > inheritance: e.g. Task is a subclass of Item, fine. but in the admin > interface (this is probably true for old

model inheritance and admin (qs-rf & nf-a)

2008-05-28 Thread Andre Meyer
hi all working with the newforms-admin branch i tried to build a model using model inheritance: e.g. Task is a subclass of Item, fine. but in the admin interface (this is probably true for old and newforms versions) there is something funny happening. when trying to add a Task instance

Models inheriting properties from related models in admin (not model inheritance)

2008-05-14 Thread [EMAIL PROTECTED]
I'm trying to figure out the best way of solving a problem using Django and ideally leveraging the admin as much as possible. I have a Subscription model which represents a magazine subscription. A subscription can have a default template for content as well as some regionalised information

Re: child edit causes duplication with model inheritance

2008-05-09 Thread Karen Tracey
On Sat, May 10, 2008 at 12:28 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Fri, May 9, 2008 at 8:43 AM, Erwin Elling <[EMAIL PROTECTED]> > wrote: > >> >> On May 5, 1:47 pm, bobhaugen <[EMAIL PROTECTED]> wrote: >> > Thanks. If I read that last one correctly, queryset-factor was merged >> >

Re: child edit causes duplication with model inheritance

2008-05-09 Thread Karen Tracey
On Fri, May 9, 2008 at 8:43 AM, Erwin Elling <[EMAIL PROTECTED]> wrote: > > On May 5, 1:47 pm, bobhaugen <[EMAIL PROTECTED]> wrote: > > Thanks. If I read that last one correctly, queryset-factor was merged > > into trunk on 4-26, andnewforms-adminmerged trunk on 4-28 (and > > appears to do so

Re: child edit causes duplication with model inheritance

2008-05-09 Thread Erwin Elling
On May 5, 1:47 pm, bobhaugen <[EMAIL PROTECTED]> wrote: > Thanks. If I read that last one correctly, queryset-factor was merged > into trunk on 4-26, andnewforms-adminmerged trunk on 4-28 (and > appears to do so regularly), so the answer to my question is "yes". That's the way I read it as

Re: child edit causes duplication with model inheritance

2008-05-05 Thread Alan Boyce
Thanks! On May 4, 2008, at 4:37 AM, James Bennett wrote: > > On Sun, May 4, 2008 at 3:29 AM, bobhaugen <[EMAIL PROTECTED]> > wrote: >> Does that mean newforms-admin includes qs-ref? That is, newforms- >> admin includes all of the most current svn trunk? > > The ideal way to find out this

Re: child edit causes duplication with model inheritance

2008-05-05 Thread bobhaugen
On May 4, 3:37 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Sun, May 4, 2008 at 3:29 AM, bobhaugen <[EMAIL PROTECTED]> wrote: > > Does that mean newforms-admin includes qs-ref? That is, newforms- > > admin includes all of the most current svn trunk? > > The ideal way to find out this

Re: child edit causes duplication with model inheritance

2008-05-04 Thread James Bennett
On Sun, May 4, 2008 at 3:29 AM, bobhaugen <[EMAIL PROTECTED]> wrote: > Does that mean newforms-admin includes qs-ref? That is, newforms- > admin includes all of the most current svn trunk? The ideal way to find out this sort of information is to watch the development timeline:

Re: child edit causes duplication with model inheritance

2008-05-04 Thread bobhaugen
On May 4, 2:49 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > As a slight addendum to what James said, it will be implemented in the > newforms-admin branch, and will be available in trunk after the > merge(you can of course use the newforms-admin branch if you need > this). Does that mean

Re: child edit causes duplication with model inheritance

2008-05-04 Thread [EMAIL PROTECTED]
On Sun, May 4, 2008 at 12:58 AM, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > >  if you add an "A" object then edit it and hit save it duplicates > >  itself. Does anyone else have this trouble with model inheritance? > > The admin does not currently suppor

Re: child edit causes duplication with model inheritance

2008-05-04 Thread James Bennett
On Sun, May 4, 2008 at 12:58 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > if you add an "A" object then edit it and hit save it duplicates > itself. Does anyone else have this trouble with model inheritance? The admin does not currently support model inheri

child edit causes duplication with model inheritance

2008-05-03 Thread [EMAIL PROTECTED]
try: class Base(models.Model): name = CharField(max_length = 100) class Admin: pass class A(Base): desc = TextField() class Admin: pass if you add an "A" object then edit it and hit save it duplicates itself. Does anyone else have this trouble

Re: a question about model inheritance after qs-rf

2008-05-01 Thread medhat
You are right, and my sample function above "extend" also works. The problem is that I had a read-only property in my child model that had the same name as one of the fields in the parent model. I had not noticed that until I dug deeper to investigate the issue :-( thanks for your help. --

Re: a question about model inheritance after qs-rf

2008-05-01 Thread AmanKow
I did the following, it works fine: from django.db import models class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) def __unicode__(self): return self.name # you can call this on any model object def

Re: a question about model inheritance after qs-rf

2008-05-01 Thread AmanKow
aven't set the fields other than the pk, they > will be overwritten with default values > > On Apr 29, 11:46 pm, medhat <[EMAIL PROTECTED]> wrote: > > > Hi, > > > QS-rf in general and model inheritance in particular are really cool. > > I have been waiting f

Re: a question about model inheritance after qs-rf

2008-04-30 Thread medhat
Trying to use this idea, I created the following function: def extend(parent_class, parent_id, child_class, **kwargs): p = parent_class.objects.filter(pk=parent_id).values()[0] p.update(kwargs) c = child_class(**p) return c but that still does not work. It throws an

Re: a question about model inheritance after qs-rf

2008-04-30 Thread AmanKow
ll the fields in the content type, if you save > from the child, and you haven't set the fields other than the pk, they > will be overwritten with default values > > On Apr 29, 11:46 pm, medhat <[EMAIL PROTECTED]> wrote: > > > Hi, > > > QS-rf in general and

Re: Which kind of model inheritance is most suited?

2008-04-30 Thread Guillaume Lederrey
2008/4/29 francesco <[EMAIL PROTECTED]>: > I'd like to implement two kind of users in my system: a buyer and a > seller. > Both kind of users should, of course, inherit from a user model. > As I'd like to use the authentication framework from django.contrib, > should I have the "user" as

a question about model inheritance after qs-rf

2008-04-29 Thread medhat
Hi, QS-rf in general and model inheritance in particular are really cool. I have been waiting for them for a long time, thanks :-) I am trying now to use them. And one question I have is the following: for multi-table inheritance, (using the example from the documentation,) let's say that we

Which kind of model inheritance is most suited?

2008-04-29 Thread francesco
Hi, I'd like to implement two kind of users in my system: a buyer and a seller. Both kind of users should, of course, inherit from a user model. As I'd like to use the authentication framework from django.contrib, should I have the "user" as table in the database or can I get by with an abstract

Re: Custom field not created with model inheritance

2008-04-13 Thread Alex Koshelev
Do you use proper django branch with model inheritance support? Trunk doesn't On Apr 13, 5:37 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to have a model inherit from another which has a custom > field: > > import uuid > from django.db import models >

Custom field not created with model inheritance

2008-04-13 Thread Julien
els.CharField(max_length=80, blank=True) The problem is that when I run syncdb, the table 'myclass' only contains the attributes 'name' and 'title', not 'uuid'. What am I missing. Do I need to alter the UUIField class to make it compatible with model inheritance? Thanks a

Re: Model Inheritance

2008-03-31 Thread [EMAIL PROTECTED]
> No, it's working in a branch. By the way, the specific branch that this should be working under is queryset-refactor. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Model Inheritance

2008-03-31 Thread James Bennett
On Mon, Mar 31, 2008 at 1:01 AM, jurian <[EMAIL PROTECTED]> wrote: > It's working on the latest development release. No, it's working in a branch. > Does that mean I > should move this discussion to the developers group? No, it means that if you're interested you should check out the branch,

Re: Model Inheritance

2008-03-30 Thread David Marquis
I think that Django does not support model inheritance (yet). The dev team seems to have thought about it : http://code.djangoproject.com/wiki/ModelInheritance You might want to ask Google for "django model inheritance" for all the information you need. -- David On 30-Mar-08,

Model Inheritance

2008-03-30 Thread jurian
How would I go about implementing a model that only exists to be inherited from and not used on it's own? Example: class Animal(models.Model): name = models.CharField() class Dog(Animal): x = models.CharField() class Cat(Animal): y = models.CharField() In the example I want to create and

Re: Opinion requested on issue related to model inheritance and exceptions

2008-02-06 Thread Kenneth Gonsalves
t me illustrate with an small abstract example. model inheritance last worked in 0.91 - and that too not well. It is not supported -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ Foss Conference for the common man: http://registration.

Re: Opinion requested on issue related to model inheritance and exceptions

2008-02-06 Thread Safariman
After asking around in #django it dawned to me that model inheritance is something which isn't really supported in Django, so I'll just have to think of a different solution. In any case, thanks for reading this post... :) --~--~-~--~~~---~--~~ You received

Opinion requested on issue related to model inheritance and exceptions

2008-02-06 Thread Safariman
Hello all, I'd like some opinions about something. I'd like to know if this is correct behavior or if it could be considered a bug in django. This issue is related to 2 models where one model is the superclass of the other. Let me illustrate with an small abstract example. class

Re: alternative to model inheritance?

2007-09-03 Thread [EMAIL PROTECTED]
Overriding your save() Method may help. Insted of having to manually define a "Project" everytime, you could let it be created everytime a new Instance of "...project" is created. i also would change the "type" Field to a CharField. Then the save() Method can also set the Type of Depending

Re: alternative to model inheritance?

2007-09-03 Thread Doug
I guess my issue is that I only want to have to enter the project once. I don't want to create a Project and then have to create a StudentProject and link them via a foreign key. I'm having trouble visualizing how this would look/work in the admin. Ideally, I would have a select box that asked

Re: alternative to model inheritance?

2007-09-03 Thread Stefan Rimaila
I don't think you need to create this kind of inheritance, but instead, you could create projects with ForeignKeys that point to a certain project type. This would of course then require some additional tweaking or customising on your models (such as the client, discipline, etc.), as Django,

alternative to model inheritance?

2007-09-03 Thread Doug
I m creating new models for a portfolio application. I am creating a Project class and one of the fieldsof this class will be "type". There will be four types of Projects: Student, Professional, Competition, Personal. Each of these types will share most fields but some types will have addtional

Re: One-to-one relationship (model inheritance) or generic relations?

2007-06-29 Thread Jamie Pittock
best > > with one parent model or will I be ok keeping them separate? The > > different types of venues have quite a number of different attributes > > btw which is why they are different models rather than simply > > categoried. > > Model inheritance sounds good on p

Re: One-to-one relationship (model inheritance) or generic relations?

2007-06-28 Thread Russell Keith-Magee
erent types of venues have quite a number of different attributes > btw which is why they are different models rather than simply > categoried. Model inheritance sounds good on paper, but in practice, it gets somewhat inconvenient - lots of table joins to get at basic attributes, etc.

One-to-one relationship (model inheritance) or generic relations?

2007-06-28 Thread Jamie Pittock
I'm still new to Django so bear with me ;) I have models for different types of venues (Bars, Clubs, etc). Because for example, I'd like to use one Rating model across all these venue Models I'd presumed that I'd need a parent Venue Model, using some kind of one-to-one relationship (until model

Re: How does Django handle Model Inheritance?

2007-04-18 Thread Raphael Melo de Oliveira Bastos Sales
On 4/17/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 4/17/07, Raphael Melo de Oliveira Bastos Sales > <[EMAIL PROTECTED]> wrote: > > I'm a newcomer to this list, so be patient if this is a dumb > > question. I'd like to know how does DJango ha

Re: How does Django handle Model Inheritance?

2007-04-17 Thread James Bennett
On 4/17/07, Raphael Melo de Oliveira Bastos Sales <[EMAIL PROTECTED]> wrote: > I'm a newcomer to this list, so be patient if this is a dumb > question. I'd like to know how does DJango handle Model Inheritance. Model inheritance is not currently supported in Django. It will be at

How does Django handle Model Inheritance?

2007-04-17 Thread Raphael Melo de Oliveira Bastos Sales
Hi everyone, I'm a newcomer to this list, so be patient if this is a dumb question. I'd like to know how does DJango handle Model Inheritance. For example, if I do something like this and use PostgreSQL: class BaseModel( models.Model ): base_attribute = models.CharField() class

model inheritance

2007-04-10 Thread Grupo Django
Hi! I need to create a custom user profile, and I was going to do it as James said in his blog [1], but first I'd like to know how is the model inheritance going. Is still the James way the best way to do it? Thank you. [1] http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user

Re: Simple model inheritance

2007-04-01 Thread Kenneth Gonsalves
On 01-Apr-07, at 10:18 PM, Kyle Fox wrote: >> Django's model inheritance will have an attribute to indicate that >> the >> base class is an abstract base, just as you are asking about. > > Do you mean this feature isn't yet in django? I haven't found > anythin

Re: Simple model inheritance

2007-04-01 Thread Kyle Fox
> Django's model inheritance will have an attribute to indicate that the > base class is an abstract base, just as you are asking about. Do you mean this feature isn't yet in django? I haven't found anything on the docs about this (I could really use it too!) If it's in the trunk, do yo

Re: Simple model inheritance

2007-03-31 Thread Sebastjan Trepca
Great, thanks! Sebastjan On 3/31/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Sat, 2007-03-31 at 11:26 +0200, Sebastjan Trepca wrote: > > Hi all, > > > > I noticed there are few threads about model inheritance and proposals, > > but they all ref

Re: Simple model inheritance

2007-03-31 Thread Malcolm Tredinnick
On Sat, 2007-03-31 at 11:26 +0200, Sebastjan Trepca wrote: > Hi all, > > I noticed there are few threads about model inheritance and proposals, > but they all reflect the inheritance to the database also. > I don't really want inheritance in database with all those joins etc, >

Simple model inheritance

2007-03-31 Thread Sebastjan Trepca
Hi all, I noticed there are few threads about model inheritance and proposals, but they all reflect the inheritance to the database also. I don't really want inheritance in database with all those joins etc, what I would need is just something that will spare me the copy/pasting of similar

Re: Best way to accomplish model inheritance

2006-12-24 Thread Aaron Jacobs
eField` instead of a `ForeignKey`? 2. use OO inheritance, current django support inheritance model -- inheritance all parent fields to child. class Place(models.Model): name = models.CharField(maxlen

Re: Best way to accomplish model inheritance

2006-12-24 Thread favo
Hi Aaron, I know there're two way to use model inheritance with current django. both are not perfect, you could choice what you need. That's say model inheritance is still not a feature of django, but should be one imo. 1. as you said, use OneToOne field class Place(models.Model

Best way to accomplish model inheritance

2006-12-22 Thread Aaron Jacobs
Hey everyone, I'm currently attempting to design my first Django application. The model framework seems to be pretty nice -- it reminds me a bit of Apple's Core Data, except more geared toward web development. The model for my application conceptually needs something like model inheritance

Re: Re: Model inheritance

2006-12-14 Thread James Bennett
On 12/14/06, Crispin Bennett <[EMAIL PROTECTED]> wrote: > I assume it would be possible to get at child instances via some kind > of introspection on instances of the base class (ie. so I could > iterate usefully over collections of base class instances)? You may want to read this thread from

Re: Model inheritance

2006-12-14 Thread Crispin Bennett
On 12/14/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > Django does have the ability to do a sort of model inheritance, using > OneToOneFields. This establishes a 1-1 relationship between a base > class and a child class. I assume it would be possible to get at child

Re: Model inheritance

2006-12-14 Thread Russell Keith-Magee
On 12/15/06, Crispin Bennett <[EMAIL PROTECTED]> wrote: > But out of interest, does anyone here know what those > semantic changes relate to? They relate to the new model inheritance code. Usage of 1-1 relations will change a bit when the model inheritance features become avail

Re: Model inheritance

2006-12-14 Thread Crispin Bennett
On 12/14/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > Yes and No. > > Django does have the ability to do a sort of model inheritance, using > OneToOneFields. This establishes a 1-1 relationship between a base > class and a child class. For example: >

Re: Model inheritance

2006-12-14 Thread Russell Keith-Magee
odel page class which various page types inherit. But I can't imagine > how the Django ORM layer handles this. > > Would I be barking up the wrong tree? Yes and No. Django does have the ability to do a sort of model inheritance, using OneToOneFields. This establishes a 1-1 relationship be

Model inheritance

2006-12-13 Thread Crispin Bennett
My first experiment with Django is a kind of wiki that involves being able to add a variety of different types of pages, each with their own set of fields. The obvious way to do this would be to create a base model page class which various page types inherit. But I can't imagine how the Django

Poor man's model inheritance question.

2006-10-31 Thread medhat
Hi, I am using OneToOneField to simulate model inheritance. I have all the shared fields in a base model, and then for every specific case I have a derived model that has a OneToOneField to that base model. That was all working fine. Recently I was trying to encapsulate some

Re: Model Inheritance Update?

2006-10-15 Thread Malcolm Tredinnick
On Sun, 2006-10-15 at 21:52 -0500, Edward A. Muller wrote: > Just looking to see if there is any recent news on the Model Inheritance > project/code? Not really and no news is not good news on this one. I've been the one dragging us down here. Sorry, I suck. Some jobs and a couple of oth

Model Inheritance Update?

2006-10-15 Thread Edward A. Muller
Just looking to see if there is any recent news on the Model Inheritance project/code? -- Edward Muller Manager - Interlix, LLC 417.862.0573 http://interlix.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread gabor
James Bennett wrote: > On 5/30/06, Russell Blau <[EMAIL PROTECTED]> wrote: >> "it'll work for now..." BUT, as has been discussed here over the past few >> weeks, it is not guaranteed to work for the future -- there is a warning in >> the new docs *not* to use OneToOneField because it's expected

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread [EMAIL PROTECTED]
Well, I just switched back to a two-day-old backup. I'm an OO guy at heart and I really can't bring myself to replace inheritance with one-to-one relations or delegates or copy/paste. *sigh* - I'll just have to do it all again when there's a stable release >= 0.95 which supports inheritance.

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread James Bennett
On 5/30/06, Russell Blau <[EMAIL PROTECTED]> wrote: > "it'll work for now..." BUT, as has been discussed here over the past few > weeks, it is not guaranteed to work for the future -- there is a warning in > the new docs *not* to use OneToOneField because it's expected to change > soon. That

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread Russell Blau
"James Bennett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On 5/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Now that I knew what I was looking for, I found a note in this page: > > http://code.djangoproject.com/wiki/WikiStart : "[...] so if you need > > model

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread Don Arbow
On May 30, 2006, at 10:35 AM, Mark Striebeck wrote: > what has been discussed for two months? that model inheritance will > not > longer be supported? or that there is a alternate way to support the > concept? What was discussed is that model inheritance is not yet ready for

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread James Bennett
On 5/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Now that I knew what I was looking for, I found a note in this page: > http://code.djangoproject.com/wiki/WikiStart : "[...] so if you need > model subclassing stick to one of the older stable releases". "or use workarounds like

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread [EMAIL PROTECTED]
> it has been discussed here for two months And what good is THAT supposed to do? As opposed to, e.g., maybe including this in the list of backwards-incompatible incompatible changes http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges or on the

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread Mark Striebeck
what has been discussed for two months? that model inheritance will not longer be supported? or that there is a alternate way to support the concept? (i just subscribed to this list a few days ago but have the same issue as daniel)     MarkS Douglas Campos wrote: it has been discussed

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread Douglas Campos
now that it's been merged to > trunk and adopted by so many people, only to discover after my stuff > breaks and I do some reading up in the newsgroup, that model > inheritance (which I use quite a lot of) is not supported AT ALL in the > MR branch. > > I read and fo

No Model Inheritance in Magic-Removal?

2006-05-30 Thread [EMAIL PROTECTED]
newsgroup, that model inheritance (which I use quite a lot of) is not supported AT ALL in the MR branch. I read and followed these docs: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet http://code.djangoproject.com/wiki/RemovingTheMagic Both of these don't even MENTION model inheritance (I ju

Re: Model Inheritance

2006-05-11 Thread Joseph Kocherhans
On 5/6/06, Jason F. McBrayer <[EMAIL PROTECTED]> wrote: > > Let me know when and how I can help on the new-auth branch. I've commited the code at this point, but I still need to revise the docs I've written. I hope to commit those tonight. For an example of how to write a backend you can check

Re: Model Inheritance

2006-05-06 Thread Jason F. McBrayer
On Fri, 2006-05-05 at 15:06 -0600, Joseph Kocherhans wrote: > That sounds about right. I've been developing a new authentication > system for django since PyCon that allows for different or even > multiple backends... the api has been pretty unstable so far, but it's > getting close. I've

Re: Model Inheritance

2006-05-05 Thread Joseph Kocherhans
On 5/5/06, Jason F. McBrayer <[EMAIL PROTECTED]> wrote: > > "Joseph Kocherhans" <[EMAIL PROTECTED]> writes: > > > Yeah, it hasn't been implemented yet. I'd be (pleasantly) surprised to > > see it finished before the end of the summer. Your best bet is to use > > ForeignKey and/or OneToOneField.

Re: Model Inheritance

2006-05-05 Thread Jason F. McBrayer
"Joseph Kocherhans" <[EMAIL PROTECTED]> writes: > Yeah, it hasn't been implemented yet. I'd be (pleasantly) surprised to > see it finished before the end of the summer. Your best bet is to use > ForeignKey and/or OneToOneField. It's probably not exactly what you > want, but it should work. Note

Re: Model Inheritance

2006-05-05 Thread Joseph Kocherhans
On 5/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I want to use Model Inheritance, so I read this article > http://code.djangoproject.com/wiki/ModelInheritance > but it seems that it's only a proposal and has not been implemented, > right? > Does it mean that I c

Model Inheritance

2006-05-04 Thread [EMAIL PROTECTED]
I want to use Model Inheritance, so I read this article http://code.djangoproject.com/wiki/ModelInheritance but it seems that it's only a proposal and has not been implemented, right? Does it mean that I can't use it at this time? What should I do? TIA

Re: Model inheritance

2006-03-25 Thread James Bennett
On 3/25/06, Andy Dustman <[EMAIL PROTECTED]> wrote: > Surprisingly (a bit, at least), I created an app with the example model: ..snip... > Which is not what you'd expect based on that page, so presumably the > changes haven't been implemented yet. Or is the page obsolete? I'd > assume not since

Model inheritance

2006-03-25 Thread Andy Dustman
ble without using triggers of some sort), so you'd still have to update the base tables separately as needed, but that is no worse (in fact the same) as if you doing an explicit join. Another weird thing I've found is model inheritance and ManyToManyFields. I have a model that looks kind of like t

<    1   2   3