Re: Model inheritance problem

2013-09-17 Thread George Lund
Ah okay, well I've never used that, I thought you were implying this could be a general Django question. Maybe neo4django doesn't support model inheritance -- I took a look at their site briefly and couldn't see anything about it. Sorry not to be more help... On Tuesday, 17 September 2013

Re: Model inheritance problem

2013-09-17 Thread Antonio Mignolli
Hmm, no, it does not work even without indexed=True, my mistake. So the "issue" remains. Il giorno martedì 17 settembre 2013 16:17:04 UTC+2, Antonio Mignolli ha scritto: > > Thanks, George, but as I said in the beginning, I'm using neo4django, > which surely has StringProperty, otherwise I

Re: Model inheritance problem

2013-09-17 Thread Antonio Mignolli
Thanks, George, but as I said in the beginning, I'm using neo4django, which surely has StringProperty, otherwise I would have an AttributeError on StringProperty, which I don't have. I should have written: from neo4django.db import models and ... name = models.StringProperty(indexed=True)

Re: Model inheritance problem

2013-09-17 Thread George Lund
> class MyBaseModel(models.NodeModel): >name=StringProperty() >class Meta: >abstract = True > > In Django you would need CharField or similar. StringProperty is a Google App Engine thing? Cf

Model inheritance problem

2013-09-15 Thread Antonio Mignolli
Hi, I posted something similar also to italian Django-it group. I'm using neo4django, but I want to understand things in a more generic way. My case: class MyBaseModel(models.NodeModel): name=StringProperty() class Meta: abstract = True NodeModel it's a graph Node, like a record

model inheritance problem

2009-07-30 Thread Unnamed_Hero
Here is my problem. I have a database already filled with some sort of data. I have several tables with "some code" - "value" (without any primary keys at all, but codes are unique). Also there is a table (called c12b) with a "some thing" "note_1", "note_2" "code_1" "code_2", where code_1, code_2

Re: Model inheritance problem, inherited instances

2009-07-22 Thread Peter Cicman
Hi Rodrigue, thats exactly what i tried as a first, but unfortunately something like this doesn't work. And seems there isn't any "standard" workaround for this. Solutions are: 1.) call raw sql for creating record in B table, 2.) copy all local_fields values from a to b, after this save works..

Re: Model inheritance problem, inherited instances

2009-07-21 Thread Rodrigue
If you look here http://docs.djangoproject.com/en/dev/topics/db/models/#id7 you'll see that multi-table inheritance is handled at the db level "via an automatically-created OneToOneField". This means that an instance of B has a foreign key to an instance of A. At the model level, there should be

Model inheritance problem, inherited instances

2009-07-20 Thread Peter Cicman
Hi, i didn't found noting about it in docs, so i'll try to ask, first explanation, i have: class A(models.Model): name = models.CharFiled(, required=True) . class B(A): I have an existing instance of A, say `a` and i "want to make" instance of b out of it. i'm

Re: Model inheritance problem in admin

2008-07-14 Thread David
Thanks, Malcolm. It was great to see inheritance in the first place, and we'll just wait for newforms-admin to use an admin interface to it. On Jul 14, 5:51 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-07-14 at 14:46 -0700, David wrote: > > When I save objects from the admin

Re: Model inheritance problem in admin

2008-07-14 Thread Malcolm Tredinnick
On Mon, 2008-07-14 at 14:46 -0700, David wrote: > When I save objects 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