Re: [mezzanine-users] Custom Django app used to replace Cartridge models and functions

2014-09-14 Thread Andrew Walters
Thank you very much for your feedback .

The field injection looks very useful , if I still want to add custom 
functions would my only option be to subclass ?


On Friday, 12 September 2014 20:57:11 UTC+2, Kenneth Bolton wrote:

 Your instincts are good; copying and/or modifying the cartridge source 
 will cause major problems when you are ready to upgrade.

 Cartridge is just a Django app, so go ahead with custom apps. Custom apps 
 are particularly useful for storing your custom templates, user profiles, 
 and such.

 To modify the Product model, use Mezzanine's field injection 
 http://mezzanine.jupo.org/docs/model-customization.html#field-injection.

 hth,
 ken

 On Fri, Sep 12, 2014 at 2:40 PM, Andrew Walters abwal...@gmail.com 
 javascript: wrote:

 Hi , 

 I am trying to figure the cleanest and most efficient way of implementing 
 my own code alongside Cartridge . 
 Currently I want to add a few custom fields and functions to the 
 Cartridge Product model . Initially I copied the cartridge.shop folder over 
 to my project and edited the original definitions . However I imagine this 
 will cause problems later on with readability and any eventual updates.

 Ideally I'd like to create an additional app e.g. custom-code that 
 would have my own implementation of the Product model in it's models.py , 
 with the hope that I could somehow then have this Product class used 
 instead of the default Cartridge model.
 Does anyone know if something like this is possible ?

 I am loath to subclass the Product model , because if I understand 
 correctly I'd then have a second admin page for entering data for this 
 class .

 Any help will be much appreciated . I've used Python quite extensively 
 but other than a few tutorials I am relatively new to Django . 
 Alternatively I'd really appreciate anyone who can point me to an example 
 site with good practices for customizing Cartridge .

 Thanks 
 Andrew

 -- 
 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-use...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




-- 
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 Django app used to replace Cartridge models and functions

2014-09-12 Thread Andrew Walters
Hi , 

I am trying to figure the cleanest and most efficient way of implementing 
my own code alongside Cartridge . 
Currently I want to add a few custom fields and functions to the Cartridge 
Product model . Initially I copied the cartridge.shop folder over to my 
project and edited the original definitions . However I imagine this will 
cause problems later on with readability and any eventual updates.

Ideally I'd like to create an additional app e.g. custom-code that would 
have my own implementation of the Product model in it's models.py , with 
the hope that I could somehow then have this Product class used instead of 
the default Cartridge model.
Does anyone know if something like this is possible ?

I am loath to subclass the Product model , because if I understand 
correctly I'd then have a second admin page for entering data for this 
class .

Any help will be much appreciated . I've used Python quite extensively but 
other than a few tutorials I am relatively new to Django . 
Alternatively I'd really appreciate anyone who can point me to an example 
site with good practices for customizing Cartridge .

Thanks 
Andrew

-- 
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.