[mezzanine-users] Cartridge creating a product with a user defined price

2014-11-17 Thread henri
Hey Josh,

I also would like to implement donation driven products.
Do you still stay with this approach or have you found a better solution?

Henri 

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Custom Page model throwing error when deleting from page tree view

2014-11-17 Thread Steven Yuan


I have a custom mode that in inherits from the Mezzanine Page model, let's 
just call it PressRoom. I have no problem adding a new PressRoom page in 
the admin interface. I tried dragging the page and making it a child of one 
of the top level pages. Then I tried to delete the page and it threw this 
error:

IntegrityError at /admin/pages/page/3/delete/(1451, 'Cannot delete or update a 
parent row: a foreign key constraint fails (`main_django`.`main_pressroom`, 
CONSTRAINT `page_ptr_id_refs_id_61318436` FOREIGN KEY (`page_ptr_id`) 
REFERENCES `pages_page` (`id`))')

I have a custom mode that in inherits from the Mezzanine Page model:

class PressRoom(Page):
rel_canonical = models.CharField(blank=True, max_length=256)
pressreleases = PressRelease.objects.all()

Here is the corresponding admin.py code:

class PressRoomAdmin(reversion.VersionAdmin, PageAuthGroupAdminMixin, 
PageAdmin):
model = appdmodels.PressRoom
fieldsets = (
(None, {
'fields': (
'title',
'status',
'publish_date',
'in_menus',
'login_required',
),
}),
('Meta', {
'fields' : (
'_meta_title',
'slug',
'rel_canonical',
'description',
'keywords',
'gen_description',
'in_sitemap',
),
}),
)

admin.site.register(appdmodels.PressRoom, PressRoomAdmin)

I have a feeling it has to do with the page_ptr_id not being updated, but 
I'm not sure what and where to update. Or perhaps I broke some convention 
and now it's throwing errors. Any help would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Cartridge creating a product with a user defined price

2014-11-17 Thread Josh B
This approach has been solid for me and currently using it in a production 
environment. For my use I needed real Donation products as they needed to 
expire or only sell a limited number. If you don't need that functionality 
then you can use what Josh C posted.

Josh

On Monday, November 17, 2014 4:56:44 AM UTC-7, henri wrote:
>
> Hey Josh,
>
> I also would like to implement donation driven products.
> Do you still stay with this approach or have you found a better solution?
>
> Henri 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.