Re: [mezzanine-users] Variable product price
Hey Maxim, a few ideas: 1. Have a cron job that runs every so often and updates the prices, based on the time of year 2. Take a look at https://groups.google.com/forum/#!searchin/mezzanine-users/Cartridge$20creating$20a$20product$20with$20a$20user$20defined$20price/mezzanine-users/eyp0l-gnNt8/fXQsH-RAXzwJ, it's not exactly what you are looking for but deals with having products without a predefined price. The important takeaway is that the cart can handle having arbitrary products that don't necessary match up with items in the database. So you could use Cartridge's cart (to some extent) without using the way it displays products. On Sun, Dec 7, 2014 at 3:44 AM, Maxim mshi...@gmail.com wrote: Hello, I'm trying to modify cartridge to make it a very simple reservation system. In my project Product's price depend on time of the year( example: june - August - $100, September-December -200, 300 the rest of the year) and number of people( example: maximum 6 people, any additional person +$50 ). These conditions apply per product basis, products may have different date ranges. When Customer creates reservation, selects his check-in/check-out dates and number of people. What would be the best approach to implement this within current cartridge model? Any hints much appreciated. Regards -- 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. -- 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.
Re: [mezzanine-users] Django-Filebrowser, TinyMCE, Amazon S3, Nginx 502 Bad Gateway Error
I looked at DDT, and it appears the that the queries aren't the issues. There only seems to be 10 db queries on each page in django-filebrowser. However, the DDT log files are huge. On a single page that where django-filebrowser is loading 10~ images and the directories where the audio is stored, the log file is 2000 lines. When I load the large directory of audio files on my local dev server, the log file is 290,000+ lines and it slows my virtual machine to a crawl. Boto appears to be logging the following for each file in filebrowser: DEBUG 03:54:11 12/08/2014 boto path=/media/uploads/img_0057_3_-_reduced.jpg DEBUG 03:54:11 12/08/2014 boto auth_path=/bucket/media/uploads/img_0057_3_-_reduced.jpg path/to/boto/s3/connection.py:653\ DEBUG 03:54:11 12/08/2014 boto Method: HEAD DEBUG 03:54:11 12/08/2014 boto Path: /media/uploads/img_0057_3_-_reduced.jpg path/to/boto/connection.py:898\ DEBUG 03:54:11 12/08/2014 boto Data: path/to/boto/connection.py:899\ DEBUG 03:54:11 12/08/2014 boto Headers: \{\} DEBUG 03:54:11 12/08/2014 boto Host: bucket.s3.amazonaws.com DEBUG 03:54:11 12/08/2014 boto Port: 443 path/to/boto/connection.py:902\ DEBUG 03:54:11 12/08/2014 boto Params: \{\} path/to/boto/connection.py:903\ DEBUG 03:54:11 12/08/2014 boto Token: None DEBUG 03:54:11 12/08/2014 boto StringToSign:\ HEAD HEAD\ \ \ Mon, 08 Dec 2014 20:54:11 GMT Mon 08 Dec 2014 20:54:11 GMT\ /bucket/media/uploads/img_0057_3_-_reduced.jpg /bucket/media/uploads/img_0057_3_-_reduced.jpg path/to/boto/auth.py:144\ DEBUG 03:54:11 12/08/2014 boto Signature:\ AWS key:key= path/to/boto/auth.py:148\ DEBUG 03:54:11 12/08/2014 boto Final headers: \{'Date': 'Mon 08 Dec 2014 20:54:11 GMT' DEBUG 03:54:11 12/08/2014 boto Response headers: [('content-length' '132168') So I guess this is how my log files are so long in a directory with 3000 audio files. Is this a standard for boto? At this point I'm at a loss as to how to solve this issue, and I feel like my only option moving forward is to bypass django-filebrowser for my audio files (which currently uses the mezzanine.FileField) and just using a standard django.FileField. I didn't want to do this as I like having the ability to change the audio file for each product from the admin without uploading a new one to the bucket anytime I want to change that particular product. On Wednesday, November 26, 2014 10:20:09 PM UTC-5, Mario Gudelj wrote: Is it possible that the app is making loads of DB queries? Have you had a look at django debug toolbar? I have a Mezza site with a large number of products and as this number got larger the admin slowed down drastically. I looked as DDT and it was making 400 DB queries because of some django sites query. So I disabled that and everything sped up. Perhaps something similar is happening here. Cheers, Mario P: +61 2 9281 3315 M: +61 415 193775 E: ma...@twoblokeswithapostie.com javascript: W: www.twoblokeswithapostie.com On Thu, Nov 27, 2014 at 9:51 AM, Billy Reynolds william.timo...@gmail.com javascript: wrote: I'm having some issues with Django-Filebrowser and from what I can tell they seem to be related to Nginx. The two primary issues I'm having is that Django-Filebrowser fails to load directories with large amounts of Amazon S3 files in the mezzanine admin and I get an http error when trying to upload large files (500Mb) to Amazon S3 through filebrowser. I have multiple directories with 400+ large audio files (several hundred MB each) hosted on S3 that when I attempt to load in mezzanine admin/media-library, my server returns an nginx 500 (bad gateway) error. I didn't have any issues with this until the directories started getting bigger. I can also upload normal sized files (images, small audio files, etc.) without any issue. It's not until I try to upload large files that I get an error. It's probably worth noting a few things: 1. I only use Amazon S3 to serve the media files for the project, all static files are served locally through nginx. 2. All django-filebrowser functionality works correctly in directories that will actually load. (with the exception of large file uploads) 3. I created a test directory with 1000 small files and django-filebrowser loads the directory correctly. 4. In the nginx.conf settings listed below (proxy buffer size, proxy_connect_timeout, etc), I've tested multiple values, multiple times and I can never get the pages to consistently load. Now that the directories are larger, I'm can't even get them to load. 5. I've tried adding an additional location in my nginx conf for admin/media-library/ with increased timeouts, and other settings I've tried... but nginx still did not load these large directories correctly. I believe my primary issues are
Re: [mezzanine-users] Variable product price
Hey Maxim, To build off of what Josh said. I would create a ProductPricing model that spells out the specific rules and pricing for each property. Then when a user selects a date reference the pricing structure and utilize the user defined pricing to set the product to that price. On Monday, December 8, 2014 10:38:25 AM UTC-7, Josh Cartmell wrote: Hey Maxim, a few ideas: 1. Have a cron job that runs every so often and updates the prices, based on the time of year 2. Take a look at https://groups.google.com/forum/#!searchin/mezzanine-users/Cartridge$20creating$20a$20product$20with$20a$20user$20defined$20price/mezzanine-users/eyp0l-gnNt8/fXQsH-RAXzwJ, it's not exactly what you are looking for but deals with having products without a predefined price. The important takeaway is that the cart can handle having arbitrary products that don't necessary match up with items in the database. So you could use Cartridge's cart (to some extent) without using the way it displays products. On Sun, Dec 7, 2014 at 3:44 AM, Maxim msh...@gmail.com javascript: wrote: Hello, I'm trying to modify cartridge to make it a very simple reservation system. In my project Product's price depend on time of the year( example: june - August - $100, September-December -200, 300 the rest of the year) and number of people( example: maximum 6 people, any additional person +$50 ). These conditions apply per product basis, products may have different date ranges. When Customer creates reservation, selects his check-in/check-out dates and number of people. What would be the best approach to implement this within current cartridge model? Any hints much appreciated. Regards -- 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.
Re: [mezzanine-users] Django-Filebrowser, TinyMCE, Amazon S3, Nginx 502 Bad Gateway Error
Have you tried disabling the logging? Here's a good tip http://stackoverflow.com/questions/1661275/disable-boto-logging-without-modifying-the-boto-files On 09/12/2014 8:29 am, Billy Reynolds william.timothy.reyno...@gmail.com wrote: I looked at DDT, and it appears the that the queries aren't the issues. There only seems to be 10 db queries on each page in django-filebrowser. However, the DDT log files are huge. On a single page that where django-filebrowser is loading 10~ images and the directories where the audio is stored, the log file is 2000 lines. When I load the large directory of audio files on my local dev server, the log file is 290,000+ lines and it slows my virtual machine to a crawl. Boto appears to be logging the following for each file in filebrowser: DEBUG 03:54:11 12/08/2014 boto path=/media/uploads/img_0057_3_-_reduced.jpg DEBUG 03:54:11 12/08/2014 boto auth_path=/bucket/media/uploads/img_0057_3_-_reduced.jpg path/to/boto/s3/connection.py:653\ DEBUG 03:54:11 12/08/2014 boto Method: HEAD DEBUG 03:54:11 12/08/2014 boto Path: /media/uploads/img_0057_3_-_reduced.jpg path/to/boto/connection.py:898\ DEBUG 03:54:11 12/08/2014 boto Data: path/to/boto/connection.py:899\ DEBUG 03:54:11 12/08/2014 boto Headers: \{\} DEBUG 03:54:11 12/08/2014 boto Host: bucket.s3.amazonaws.com DEBUG 03:54:11 12/08/2014 boto Port: 443 path/to/boto/connection.py:902\ DEBUG 03:54:11 12/08/2014 boto Params: \{\} path/to/boto/connection.py:903\ DEBUG 03:54:11 12/08/2014 boto Token: None DEBUG 03:54:11 12/08/2014 boto StringToSign:\ HEAD HEAD\ \ \ Mon, 08 Dec 2014 20:54:11 GMT Mon 08 Dec 2014 20:54:11 GMT\ /bucket/media/uploads/img_0057_3_-_reduced.jpg /bucket/media/uploads/img_0057_3_-_reduced.jpg path/to/boto/auth.py:144\ DEBUG 03:54:11 12/08/2014 boto Signature:\ AWS key:key= path/to/boto/auth.py:148\ DEBUG 03:54:11 12/08/2014 boto Final headers: \{'Date': 'Mon 08 Dec 2014 20:54:11 GMT' DEBUG 03:54:11 12/08/2014 boto Response headers: [('content-length' '132168') So I guess this is how my log files are so long in a directory with 3000 audio files. Is this a standard for boto? At this point I'm at a loss as to how to solve this issue, and I feel like my only option moving forward is to bypass django-filebrowser for my audio files (which currently uses the mezzanine.FileField) and just using a standard django.FileField. I didn't want to do this as I like having the ability to change the audio file for each product from the admin without uploading a new one to the bucket anytime I want to change that particular product. On Wednesday, November 26, 2014 10:20:09 PM UTC-5, Mario Gudelj wrote: Is it possible that the app is making loads of DB queries? Have you had a look at django debug toolbar? I have a Mezza site with a large number of products and as this number got larger the admin slowed down drastically. I looked as DDT and it was making 400 DB queries because of some django sites query. So I disabled that and everything sped up. Perhaps something similar is happening here. Cheers, Mario P: +61 2 9281 3315 M: +61 415 193775 E: ma...@twoblokeswithapostie.com W: www.twoblokeswithapostie.com On Thu, Nov 27, 2014 at 9:51 AM, Billy Reynolds william.timo...@ gmail.com wrote: I'm having some issues with Django-Filebrowser and from what I can tell they seem to be related to Nginx. The two primary issues I'm having is that Django-Filebrowser fails to load directories with large amounts of Amazon S3 files in the mezzanine admin and I get an http error when trying to upload large files (500Mb) to Amazon S3 through filebrowser. I have multiple directories with 400+ large audio files (several hundred MB each) hosted on S3 that when I attempt to load in mezzanine admin/media-library, my server returns an nginx 500 (bad gateway) error. I didn't have any issues with this until the directories started getting bigger. I can also upload normal sized files (images, small audio files, etc.) without any issue. It's not until I try to upload large files that I get an error. It's probably worth noting a few things: 1. I only use Amazon S3 to serve the media files for the project, all static files are served locally through nginx. 2. All django-filebrowser functionality works correctly in directories that will actually load. (with the exception of large file uploads) 3. I created a test directory with 1000 small files and django-filebrowser loads the directory correctly. 4. In the nginx.conf settings listed below (proxy buffer size, proxy_connect_timeout, etc), I've tested multiple values, multiple times and I can never get the pages to consistently load. Now that the directories are larger, I'm can't even get them to load. 5. I've
[mezzanine-users] Direct POST payments in Cartridge
Hi all, I don't want credit card details touching our server for PCI-DSS reasons and have a no-Javascript constraint, so I use direct POST with our payment processor. In my project I create an Order instance before the payment page is displayed, so that I'm able to pass the correct order number to my payment processor. I remember seeing a similar workaround in someone else's payment processing code a long time ago so I assume this kind of thing might be useful to more than just me. It's quite messy to bolt on aftermarket, so I propose integrating it into Cartridge, probably toggled by a new setting, SHOP_CREATE_ORDER_BEFORE_PAYMENT or similar. This change also has the helpful side-effect of allowing one to query incomplete orders – I have a job that sends a daily email summary of incomplete orders to sales staff, for example. Thoughts? Alex -- 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.