Raw SQL queries and nested fields

2010-07-02 Thread pablo platt
Hi I have a Product model that holds info common to all product types. Product has a m2m categories field. SimpleProduct and BundleProduct extends Product (one2one relation). BundleProduct have a m2m products field (only SimpleProducts allowed). class Product(models.Model): >

recommended app for editable settings in the admin?

2010-07-01 Thread pablo platt
Hi I need to let the admin change settings in the admin interface. Settings could be tax_rate, admin email, site description... The straight forward approach is to have a model of key/value pairs in the db. The key/value pairs could be cached in request.settings on the first access like

post_save and post_delete signals for a base class

2010-04-30 Thread pablo platt
Hi, Are signals suppose to fire on a base class? I have ChildModel that extends ParentModel. ParentModel is a real class not abstract. When creating a ChildModel object the post_save signal doesn't fire on the ParentModel but when deleting a ChildModel the post_delete signal fires on the

Re: loading fixtures in Oracle gives IntegrityError because of AUTH_PERMISSION table

2010-04-21 Thread pablo platt
ans <tevans...@googlemail.com> wrote: > On Wed, Apr 21, 2010 at 7:24 PM, pablo platt <pablo.pl...@gmail.com> > wrote: > > Hi > > > > I'm migrating a django1.1 project from MySQL to Oracle xe. > > I've created fixtures in MySQL and I'm trying to load them to Ora

Re: loading fixtures in Oracle gives IntegrityError because of AUTH_PERMISSION table

2010-04-21 Thread pablo platt
When I'm creating the fixtures without contenttypes and auth and loading the fixtures in Oracle I'm not getting an error but nothing is being loaded: python manage.py dumpdata --exclude=contenttypes --exclude=auth > fixture.json On Wed, Apr 21, 2010 at 9:24 PM, pablo platt <pablo.pl...@gma

loading fixtures in Oracle gives IntegrityError because of AUTH_PERMISSION table

2010-04-21 Thread pablo platt
Hi I'm migrating a django1.1 project from MySQL to Oracle xe. I've created fixtures in MySQL and I'm trying to load them to Oracle. When Trying to load the fixtures I'm getting: IntegrityError: ORA-1: unique constraint (USER.SYS_C004253) select TABLE_NAME, COLUMN_NAME from user_cons_columns

Oracle xe - unique constraint when loading fixtures

2010-04-19 Thread pablo platt
Hi I have a Django1.1 project running with MySQL that I'm trying to export to Oracle xe. I've created fixtures with the project running MySQL with: python manage.py dumpdata > fixture.json and trying to load them to Oracle with (after syncdb): python manage.py loaddata fixture.json The error I'm

using ForeignKeyRawIdWidget

2010-02-26 Thread pablo platt
Hi, I want to extend ForeignKeyRawIdWidget so I want to be able to use it without setting raw_id_fields. With the following I don't get an error but I see no effect: # models.py class Product(models.Model): ... class GroupProduct(Product): ... products =

django-treebeard with several models in the same tree

2009-12-03 Thread pablo platt
Hi, I have a catalog with ProductClass, Category and Product models. ProductClass can have ProductClass and Category child nodes. Category can only have Product child nodes. Can I implement this with django-treebeard or maybe with django-mptt? Thanks -- You received this message because you

django-treebeard or a simple model?

2009-11-30 Thread pablo platt
Hi, I'm building a simple catalog. I have nested categories. Each category can have either child categories or products but not both types. I need to read only one level of child nodes at a time to create categories and maybe move a branch. I think I'm going to use two types of models instead of