[mezzanine-users] Current approaches to multiple Product types in Cartridge
Hi, I posted something similar a while back: https://groups.google.com/forum/#!topic/mezzanine-users/-ltMQLoS8Jo But now it is getting to the stage where I'm actually going to rebuild a store and move off Satchmo, starting next week. I've reassessed the options in Python land, and I'm mostly happy with Cartridge, except for the issue of different product types. I want to check I'm not missing anything here, and hopefully hear from others who have similar stores on Cartridge. I have at least 4 product types, let's say they all share 7-8 attributes common to all products, and each have another 5-10 attributes that are unique to each Product type. The implementation of product variations/options is a way to go about it, I suppose, but it really seems most suited for variations of one product type, and not for a range of different product types. Ultimately, what I'd like to get to is a set of distinct models: Book, Accessory, Poster, TShirt - etc - for the content editor, and also for the visitor - I'm not sure how to achieve that with what I see in Cartridge. -- 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/groups/opt_out.
[mezzanine-users] Re: Current approaches to multiple Product types in Cartridge
Based on what you described I think subclassing is your best bet. Variations currently have some limitations and I don't think would accomplish what you are trying to do. (https://groups.google.com/forum/#!topic/mezzanine-users/kYzgBKcwSsg) On Wednesday, February 26, 2014 4:40:19 AM UTC-7, Paul Walsh wrote: And, BTW, I don't mind coding something in this direction (for example, subclasses of Product) if it is a common pain-point for other users in Cartridge, but first, I want to see that I understand the current implementation, and how people are using it. On Wednesday, 26 February 2014 13:37:00 UTC+2, Paul Walsh wrote: Hi, I posted something similar a while back: https://groups.google.com/forum/#!topic/mezzanine-users/-ltMQLoS8Jo But now it is getting to the stage where I'm actually going to rebuild a store and move off Satchmo, starting next week. I've reassessed the options in Python land, and I'm mostly happy with Cartridge, except for the issue of different product types. I want to check I'm not missing anything here, and hopefully hear from others who have similar stores on Cartridge. I have at least 4 product types, let's say they all share 7-8 attributes common to all products, and each have another 5-10 attributes that are unique to each Product type. The implementation of product variations/options is a way to go about it, I suppose, but it really seems most suited for variations of one product type, and not for a range of different product types. Ultimately, what I'd like to get to is a set of distinct models: Book, Accessory, Poster, TShirt - etc - for the content editor, and also for the visitor - I'm not sure how to achieve that with what I see in Cartridge. -- 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/groups/opt_out.
Re: [mezzanine-users] Stripe payments
I should have read that more thoroughly, it's at https://bitbucket.org/stephenmcd/cartridge/src/a39b3a3fe825a895c720907f29578d5dbefb552a/cartridge/shop/payment/stripe_api.py?at=default It looks like this implementation still posts the credit card info to the server and then directly charges that at Stripe rather than generating a token and never sending the cc info to your server On Wed, Feb 26, 2014 at 6:53 AM, Tom Brander tombran...@gmail.com wrote: That is helpful (thanks).. but I was wondering about the reference in the Cartridge release note (see the link) It mentions a Stripe payment handler? On Tuesday, February 25, 2014 3:13:12 PM UTC-6, Josh Cartmell wrote: Hey Tom, is this for use with Cartridge or something else? If something else I have used something like the following. in the template: script src=https://checkout.stripe.com/checkout.js;/script script $(document).ready(function() { var handler = StripeCheckout.configure({ key: '{{ settings.STRIPE_PUBLIC_KEY }}', image: '{% static whatever_image.png %}', token: function(token, args) { $('#checkout-button').prop('disabled', true); $('#id_stripe_token').val(token.id); $('#id_email').val(token.email); $('#hourly-form').submit(); } }); document.getElementById('checkout-button').addEventListener('click', function(e) { amount = cost(); // Open Checkout with further options if (amount){ handler.open({ name: '{{ settings.SITE_TITLE }}', amount: amount, billingAddress: true }); } else { alert('You must choose at least one service') } e.preventDefault(); }); }); /script Then in the forms clean method: stripe.api_key = settings.STRIPE_SECRET_KEY token = cleaned_data['stripe_token'] try: cleaned_data['charge'] = stripe.Charge.create( amount=amount, # amount in cents, again currency=usd, card=token, ) except stripe.CardError: raise forms.ValidationError(The card has been declined) Some of the above is a bit specific to my case (so it'll require a bit of editing) and I'm using the stripe checkout custom integration which is slightly more complicated but lets you specify custom buttons/images and other options. Hopefully that helps. On Tue, Feb 25, 2014 at 11:21 AM, Tom Brander tombr...@gmail.com wrote: I saw here https://groups.google.com/d/msg/mezzanine-users/ hFQeqVJP1S8/5C0fvvNpFg8J a mention of a stripe payment handler Suggestions where to go next? Any other pointers to code or docs? Just trying to wrap my head around security, auth, oauth and checkout needs for an app.. and among other things stripe seems to be able to use oauth, and not sure how or if I want to?? -- 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. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] Stripe payments
Ahh thanks! I agree, don't want exposure of keeping CC #'s! On Wednesday, February 26, 2014 11:53:20 AM UTC-6, Josh Cartmell wrote: I should have read that more thoroughly, it's at https://bitbucket.org/stephenmcd/cartridge/src/a39b3a3fe825a895c720907f29578d5dbefb552a/cartridge/shop/payment/stripe_api.py?at=default It looks like this implementation still posts the credit card info to the server and then directly charges that at Stripe rather than generating a token and never sending the cc info to your server On Wed, Feb 26, 2014 at 6:53 AM, Tom Brander tombr...@gmail.comjavascript: wrote: That is helpful (thanks).. but I was wondering about the reference in the Cartridge release note (see the link) It mentions a Stripe payment handler? On Tuesday, February 25, 2014 3:13:12 PM UTC-6, Josh Cartmell wrote: Hey Tom, is this for use with Cartridge or something else? If something else I have used something like the following. in the template: script src=https://checkout.stripe.com/checkout.js;/script script $(document).ready(function() { var handler = StripeCheckout.configure({ key: '{{ settings.STRIPE_PUBLIC_KEY }}', image: '{% static whatever_image.png %}', token: function(token, args) { $('#checkout-button').prop('disabled', true); $('#id_stripe_token').val(token.id); $('#id_email').val(token.email); $('#hourly-form').submit(); } }); document.getElementById('checkout-button').addEventListener('click', function(e) { amount = cost(); // Open Checkout with further options if (amount){ handler.open({ name: '{{ settings.SITE_TITLE }}', amount: amount, billingAddress: true }); } else { alert('You must choose at least one service') } e.preventDefault(); }); }); /script Then in the forms clean method: stripe.api_key = settings.STRIPE_SECRET_KEY token = cleaned_data['stripe_token'] try: cleaned_data['charge'] = stripe.Charge.create( amount=amount, # amount in cents, again currency=usd, card=token, ) except stripe.CardError: raise forms.ValidationError(The card has been declined) Some of the above is a bit specific to my case (so it'll require a bit of editing) and I'm using the stripe checkout custom integration which is slightly more complicated but lets you specify custom buttons/images and other options. Hopefully that helps. On Tue, Feb 25, 2014 at 11:21 AM, Tom Brander tombr...@gmail.comwrote: I saw here https://groups.google.com/d/msg/mezzanine-users/ hFQeqVJP1S8/5C0fvvNpFg8J a mention of a stripe payment handler Suggestions where to go next? Any other pointers to code or docs? Just trying to wrap my head around security, auth, oauth and checkout needs for an app.. and among other things stripe seems to be able to use oauth, and not sure how or if I want to?? -- 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. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] Stripe payments
On Wed, Feb 26, 2014 at 1:35 PM, Tom Brander tombran...@gmail.com wrote: Ahh thanks! I agree, don't want exposure of keeping CC #'s! Cartridge does not store credit card data in any of the payment handlers. -- 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/groups/opt_out.
Re: [mezzanine-users] Full CRUD on Forms segregated by signed on user
Hey Tom, here is a form that is in the demo site right now, http://mezzanine.jupo.org/en/admin/forms/form/49/. Click the view entries button near the upper right and it will let you look through, filter on the entries. I don't think you can update things, but you can delete old entries. On Wed, Feb 26, 2014 at 10:54 AM, Tom Brander tombran...@gmail.com wrote: In briefly looking at the Mezzanine Forms module I don't see functions for displaying prior entered info for update/delete. Or am I overlooking the obvious? So am I better off using another Django forms package and if so, suggestions? I need to gather data, provide for file uploads and provide for modification of same on a per user basis Ie they only see or interact their stuff on a signed in basis. Pointers and advice 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] Stripe payments
Hey Tom, in no case is the CC info ever saved to the database. The distinction is whether your server ever even sees the CC info. In Stripe's default use case your server is never sent the CC info, instead Stripe takes the CC info and provides a token that allows your server to create a charge using the Stripe API. The cartridge Stripe handler, on the other hand, does take the CC info and then submits it directly to the Stripe API. Here is Stripe's description of their security (using their default js implementation, not the cartridge handler) https://stripe.com/us/features#seamless-security On Wed, Feb 26, 2014 at 11:28 AM, Tom Brander tombran...@gmail.com wrote: Not sure I get the distinction, is the CC # stored in the cartridge DB or not using the Cartridge handler? If not, as Ken indicates, I'm not sure I understand the distinction you are making? On Wednesday, February 26, 2014 1:14:29 PM UTC-6, Josh Cartmell wrote: Ken is exactly correct. My comment was that the way Stripe encourages you to use them is through their checkout javascript which sends the CC info to Stripe's servers and returns a token that your server can use to create the charge. Their checkout form doesn't include a name attribute on the CC fields so they aren't posted to your server and at least theoretically PCI compliance is not your problem. The way the cartridge handler works is the CC info is posted to the server and then sent to Stripe using Stripe's API. The CC info is never saved to the database or anywhere else, it is just a question of whether your server ever even sees the CC details or not. On Wed, Feb 26, 2014 at 10:58 AM, Ken Bolton kenb...@gmail.com wrote: On Wed, Feb 26, 2014 at 1:35 PM, Tom Brander tombr...@gmail.com wrote: Ahh thanks! I agree, don't want exposure of keeping CC #'s! Cartridge does not store credit card data in any of the payment handlers. -- 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. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] Full CRUD on Forms segregated by signed on user
Ahh yes,, I love the way history is now being kept but that is history on form edits on the admin side, as well as entry from the user (but only available on the admin side), I need all the CRUD on the front end.. Not admin.. So user signs in creates data via form may review data using page that displays only their entered data (a list of multiple entries via forms) may change their data via an Update form could delete data (while history avail in admin) So I'm wondering if I need to travel this road? http://rayed.com/wordpress/?p=1266 On Wednesday, February 26, 2014 1:20:03 PM UTC-6, Josh Cartmell wrote: Hey Tom, here is a form that is in the demo site right now, http://mezzanine.jupo.org/en/admin/forms/form/49/. Click the view entries button near the upper right and it will let you look through, filter on the entries. I don't think you can update things, but you can delete old entries. On Wed, Feb 26, 2014 at 10:54 AM, Tom Brander tombr...@gmail.comjavascript: wrote: In briefly looking at the Mezzanine Forms module I don't see functions for displaying prior entered info for update/delete. Or am I overlooking the obvious? So am I better off using another Django forms package and if so, suggestions? I need to gather data, provide for file uploads and provide for modification of same on a per user basis Ie they only see or interact their stuff on a signed in basis. Pointers and advice 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-use...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] Re: Current approaches to multiple Product types in Cartridge
There's an old outdated pull request that implemented something like what you're talking about here: https://github.com/stephenmcd/cartridge/pull/57 If I recall it applies a similar approach to Mezzanine's pages where concrete inheritance stems from a base product, allowing custom product subclasses. I'm not sure if that code's too out of date to use, or can be revived - I suspect the latter, but if you're keen to get involved with this, that would be your best starting point. Josh's link to our recent discussion on option types is also very relevant - I think custom product types would shape addressing some of the problems there too. On Thu, Feb 27, 2014 at 5:03 AM, Paul Walsh paulywa...@gmail.com wrote: The thing I'm wondering is - has anyone gone down this path before with Cartridge (subclassing for distinct product types), and, if yes, do other parts of the application need patching to support it. On Wednesday, 26 February 2014 19:22:44 UTC+2, Josh B wrote: Based on what you described I think subclassing is your best bet. Variations currently have some limitations and I don't think would accomplish what you are trying to do. (https://groups.google.com/ forum/#!topic/mezzanine-users/kYzgBKcwSsg) On Wednesday, February 26, 2014 4:40:19 AM UTC-7, Paul Walsh wrote: And, BTW, I don't mind coding something in this direction (for example, subclasses of Product) if it is a common pain-point for other users in Cartridge, but first, I want to see that I understand the current implementation, and how people are using it. On Wednesday, 26 February 2014 13:37:00 UTC+2, Paul Walsh wrote: Hi, I posted something similar a while back: https://groups.google.com/forum/#!topic/mezzanine-users/-ltMQLoS8Jo But now it is getting to the stage where I'm actually going to rebuild a store and move off Satchmo, starting next week. I've reassessed the options in Python land, and I'm mostly happy with Cartridge, except for the issue of different product types. I want to check I'm not missing anything here, and hopefully hear from others who have similar stores on Cartridge. I have at least 4 product types, let's say they all share 7-8 attributes common to all products, and each have another 5-10 attributes that are unique to each Product type. The implementation of product variations/options is a way to go about it, I suppose, but it really seems most suited for variations of one product type, and not for a range of different product types. Ultimately, what I'd like to get to is a set of distinct models: Book, Accessory, Poster, TShirt - etc - for the content editor, and also for the visitor - I'm not sure how to achieve that with what I see in Cartridge. -- 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/groups/opt_out. -- Stephen McDonald http://jupo.org -- 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/groups/opt_out.
Re: [mezzanine-users] Re: Current approaches to multiple Product types in Cartridge
Hi Stephen, That pull request is very interesting. I'll play with it in he coming days. Thanks. On Wednesday, 26 February 2014 21:55:14 UTC+2, Stephen McDonald wrote: There's an old outdated pull request that implemented something like what you're talking about here: https://github.com/stephenmcd/cartridge/pull/57 If I recall it applies a similar approach to Mezzanine's pages where concrete inheritance stems from a base product, allowing custom product subclasses. I'm not sure if that code's too out of date to use, or can be revived - I suspect the latter, but if you're keen to get involved with this, that would be your best starting point. Josh's link to our recent discussion on option types is also very relevant - I think custom product types would shape addressing some of the problems there too. On Thu, Feb 27, 2014 at 5:03 AM, Paul Walsh pauly...@gmail.comjavascript: wrote: The thing I'm wondering is - has anyone gone down this path before with Cartridge (subclassing for distinct product types), and, if yes, do other parts of the application need patching to support it. On Wednesday, 26 February 2014 19:22:44 UTC+2, Josh B wrote: Based on what you described I think subclassing is your best bet. Variations currently have some limitations and I don't think would accomplish what you are trying to do. (https://groups.google.com/ forum/#!topic/mezzanine-users/kYzgBKcwSsg) On Wednesday, February 26, 2014 4:40:19 AM UTC-7, Paul Walsh wrote: And, BTW, I don't mind coding something in this direction (for example, subclasses of Product) if it is a common pain-point for other users in Cartridge, but first, I want to see that I understand the current implementation, and how people are using it. On Wednesday, 26 February 2014 13:37:00 UTC+2, Paul Walsh wrote: Hi, I posted something similar a while back: https://groups.google.com/forum/#!topic/mezzanine-users/-ltMQLoS8Jo But now it is getting to the stage where I'm actually going to rebuild a store and move off Satchmo, starting next week. I've reassessed the options in Python land, and I'm mostly happy with Cartridge, except for the issue of different product types. I want to check I'm not missing anything here, and hopefully hear from others who have similar stores on Cartridge. I have at least 4 product types, let's say they all share 7-8 attributes common to all products, and each have another 5-10 attributes that are unique to each Product type. The implementation of product variations/options is a way to go about it, I suppose, but it really seems most suited for variations of one product type, and not for a range of different product types. Ultimately, what I'd like to get to is a set of distinct models: Book, Accessory, Poster, TShirt - etc - for the content editor, and also for the visitor - I'm not sure how to achieve that with what I see in Cartridge. -- 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/groups/opt_out. -- Stephen McDonald http://jupo.org -- 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/groups/opt_out.
[mezzanine-users] Error with Pisa? P3?
Went to create a pdf invoice and got this error: I am using Python #.3 if that makes a diff?? Does not give me much to go on the view invoice is working fine... Traceback: File /home/tom/myvenv3/lib/python3.3/site-packages/django/core/handlers/base.py in get_response 107. response = middleware_method(request, callback, callback_args, callback_kwargs) File /home/tom/myvenv3/lib/python3.3/site-packages/mezzanine/pages/middleware.py in process_view 78. response = view_func(request, *view_args, **view_kwargs) File /home/tom/myvenv3/lib/python3.3/site-packages/cartridge/shop/views.py in invoice 358. import ho.pisa File /home/tom/myvenv3/lib/python3.3/site-packages/ho/pisa/__init__.py in module 26. from sx.pisa3.pisa import * Exception Type: SyntaxError at /shop/invoice/1/ Exception Value: invalid syntax (__init__.py, line 43) -- 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/groups/opt_out.
Re: [mezzanine-users] Error with Pisa? P3?
On 27/02/2014 7:29 AM, Tom Brander wrote: Went to create a pdf invoice and got this error: I am using Python #.3 if that makes a diff?? Does not give me much to go on the view invoice is working fine... Can you do a pip list for us? Do you have pisa and reportlab both installed? What versions? Traceback: File /home/tom/myvenv3/lib/python3.3/site-packages/django/core/handlers/base.py in get_response 107. response = middleware_method(request, callback, callback_args, callback_kwargs) File /home/tom/myvenv3/lib/python3.3/site-packages/mezzanine/pages/middleware.py in process_view 78. response = view_func(request, *view_args, **view_kwargs) File /home/tom/myvenv3/lib/python3.3/site-packages/cartridge/shop/views.py in invoice 358. import ho.pisa File /home/tom/myvenv3/lib/python3.3/site-packages/ho/pisa/__init__.py in module 26. from sx.pisa3.pisa import * Exception Type: SyntaxError at /shop/invoice/1/ Exception Value: invalid syntax (__init__.py, line 43) -- 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/groups/opt_out. -- Email: molo...@gmail.com -- 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/groups/opt_out.
Re: [mezzanine-users] Full CRUD on Forms segregated by signed on user
Yeah I'm not aware of anything else in Mezzanine so that may be the way to go. You could also just roll something of your own. On Wed, Feb 26, 2014 at 11:39 AM, Tom Brander tombran...@gmail.com wrote: Ahh yes,, I love the way history is now being kept but that is history on form edits on the admin side, as well as entry from the user (but only available on the admin side), I need all the CRUD on the front end.. Not admin.. So user signs in creates data via form may review data using page that displays only their entered data (a list of multiple entries via forms) may change their data via an Update form could delete data (while history avail in admin) So I'm wondering if I need to travel this road? http://rayed.com/wordpress/?p=1266 On Wednesday, February 26, 2014 1:20:03 PM UTC-6, Josh Cartmell wrote: Hey Tom, here is a form that is in the demo site right now, http://mezzanine.jupo.org/en/admin/forms/form/49/. Click the view entries button near the upper right and it will let you look through, filter on the entries. I don't think you can update things, but you can delete old entries. On Wed, Feb 26, 2014 at 10:54 AM, Tom Brander tombr...@gmail.com wrote: In briefly looking at the Mezzanine Forms module I don't see functions for displaying prior entered info for update/delete. Or am I overlooking the obvious? So am I better off using another Django forms package and if so, suggestions? I need to gather data, provide for file uploads and provide for modification of same on a per user basis Ie they only see or interact their stuff on a signed in basis. Pointers and advice 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-use...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] Error with Pisa? P3?
The error is coming from sx/pisa3/__init__.py, line 43 which says: {{{ if not REPORTLAB22: raise ImportError, Reportlab Toolkit Version 2.2 or higher needed }}} Now, obviously you do have reportlab of a version higher than 2.2 but there was a bug mentioned on the cartridge issues a few weeks ago which seemed to indicate that reportlab 3.0 isn't reporting its version correctly as higher than 2.2. See https://github.com/stephenmcd/cartridge/issues/174#issuecomment-35755887 It seems like it's a known bug in pisa. Hope this helps. Seeya. Danny. On 27/02/2014 9:52 AM, Tom Brander wrote: Hmm did not have reportlab, so I installed it but no change, here is the pip list (myvenv3) tom@tom-sam:~/whiteplume$ pip list bleach (1.4) Cartridge (0.9.2) Django (1.6.2) filebrowser-safe (0.3.2) future (0.9.0) grappelli-safe (0.3.6) html5lib (0.999) Mezzanine (3.0.9) oauthlib (0.6.1) Pillow (2.3.0) pip (1.5.4) pisa (3.0.33) pytz (2013.9) reportlab (3.0) requests (2.2.1) requests-oauthlib (0.4.0) setuptools (2.2) six (1.5.2) tzlocal (1.0) On Wednesday, February 26, 2014 3:43:49 PM UTC-6, Danny S wrote: On 27/02/2014 7:29 AM, Tom Brander wrote: Went to create a pdf invoice and got this error: I am using Python #.3 if that makes a diff?? Does not give me much to go on the view invoice is working fine... Can you do a pip list for us? Do you have pisa and reportlab both installed? What versions? Traceback: File /home/tom/myvenv3/lib/python3.3/site-packages/django/core/handlers/base.py in get_response 107. response = middleware_method(request, callback, callback_args, callback_kwargs) File /home/tom/myvenv3/lib/python3.3/site-packages/mezzanine/pages/middleware.py in process_view 78. response = view_func(request, *view_args, **view_kwargs) File /home/tom/myvenv3/lib/python3.3/site-packages/cartridge/shop/views.py in invoice 358. import ho.pisa File /home/tom/myvenv3/lib/python3.3/site-packages/ho/pisa/__init__.py in module 26. from sx.pisa3.pisa import * Exception Type: SyntaxError at /shop/invoice/1/ Exception Value: invalid syntax (__init__.py, line 43) -- 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/groups/opt_out https://groups.google.com/groups/opt_out. -- Email: mol...@gmail.com javascript: -- Email: molo...@gmail.com -- 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/groups/opt_out.
[mezzanine-users] Tax handling in cartridge
It's been awhile since I've used Cartridge in a project, but I have one that I'm working on right now. I was pleased to see that Cartridge now has tax support, but I'm running into some issues. Right now for my tax handler I have: total = request.cart.total_price() if request.session.has_key('discount'): discount = request.cart.calculate_discount(request.session['discount']) total -= discount tax = total * Decimal('.0875') set_tax(request, Tax, tax) For now I've hardcoded 8.75% as the tax rate. This always produces the following error: Decimal('1.7500') is not JSON serializable In this case 1.75 is 8.75% of 20, the total in this particular case. A few questions: - What type of value should be passed into set_tax? - Am I calculating the total appropriately? Thanks! -- 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/groups/opt_out.
Re: [mezzanine-users] Tax handling in cartridge
Makes sense, so it should probably be converted to a string here (I think the same thing for set_shipping): https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/utils.py#L116 I'll give that a shot and if it works create a pull request, other than that am I calculating the total in the correct way, I see now that I can pull the discount_total out of the session. On Wed, Feb 26, 2014 at 4:36 PM, Stephen McDonald st...@jupo.org wrote: Django 1.6 introduced changes which limits the data types that can be stored in sessions, specifically Decimal in this case: https://docs.djangoproject.com/en/1.6/releases/1.6/#default-session-serialization-switched-to-json Here's a commit which addressed this in Cartridge, but the tax handling was probably overlooked: https://github.com/stephenmcd/cartridge/commit/01d7b55e416681059153d48e57d0913e1e8760ef The strategy there was to just convert Decimal to string and back again where appropriate - if you're able to work on applying the same approach to tax handling, that'd be great. Either way I've opened an issue here: https://github.com/stephenmcd/cartridge/issues/176 On Thu, Feb 27, 2014 at 11:27 AM, Josh Cartmell joshcar...@gmail.comwrote: It's been awhile since I've used Cartridge in a project, but I have one that I'm working on right now. I was pleased to see that Cartridge now has tax support, but I'm running into some issues. Right now for my tax handler I have: total = request.cart.total_price() if request.session.has_key('discount'): discount = request.cart.calculate_discount(request.session['discount']) total -= discount tax = total * Decimal('.0875') set_tax(request, Tax, tax) For now I've hardcoded 8.75% as the tax rate. This always produces the following error: Decimal('1.7500') is not JSON serializable In this case 1.75 is 8.75% of 20, the total in this particular case. A few questions: - What type of value should be passed into set_tax? - Am I calculating the total appropriately? Thanks! -- 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/groups/opt_out. -- Stephen McDonald http://jupo.org -- 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/groups/opt_out. -- 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/groups/opt_out.
Re: [mezzanine-users] Full CRUD on Forms segregated by signed on user
I need something like this but not quite :) I have non-admin users that can read the form entries so I'll need to figure this out as well. Possibly edit them as well. Dave -- 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/groups/opt_out.
[mezzanine-users] Widgets for FORM_EXTRA_FIELDS
Hi, Would it be feasible to add an optional 4th element to the sequences for FORM_EXTRA_FIELDS to add a widget for the new field? Trying to find the simplest way to use django-datetimewidget with a Form Field date. Thanks Dave -- 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/groups/opt_out.