[mezzanine-users] Howto Re-Serve Images After Remove EXIF(metadata) info. from Images
Hello I have a site running with Mezzanine (4.0.1) + Cartridge with all the product images uploaded. However, I wanted to remove the MetaData info. from the images. Therefore, I used the "exiftool" to remove metadata info. from all of the images sitting in "projectname/static/media/uploads/product/somedirectory" Then I cleared the memcache, restarted nginx and collectstatic However, When I view the website again and see the image properties, the I do not see the newer images from which metadata/exif info has been removed. When I goto the server directory "projectname/static/media/uploads/product/somedirectory" and check the metadata info with exiftool, I see it has been removed. Where are the images being served from and why I DO NOT see the images from which metadata has been removed Thank Vikram -- 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] accessing local dev server on Vbox guest over the LAN
I am trying to access my local development server over the LAN. My environment as follows - Host machine - Windows 10 Guest machine - VBOX Running Ubuntu 12.01 Networking - Bridged Mode Ubuntu is configured to Static IP - 192.168.2.10 Host IP - 192.168.2.9 I can access the apache server running on port 80 as follows both from guest machine and host machine either through the browser address 192.168.2.10 OR from cmdline wget 192.168.2.10 However, when i run django development server python manage.py runserver 0.0.0.0:8000 OR python manage.py runserver 192.168.2.10:8000 and then I try to access the django development server - from guest machine - wget 192.168.2.10:8000 - from host machine - wget 192.168.2.10:8000 I get the following error * wget 192.168.2.10:8080--2015-09-10 18:56:55-- http://192.168.2.10:8080/Connecting to 192.168.2.10:8080... connected.HTTP request sent, awaiting response... 301 MOVED PERMANENTLYLocation: http://127.0.0.1/ [following]--2015-09-10 18:56:55-- http://127.0.0.1/Connecting to 127.0.0.1:80... failed: Connection refused.* What is going on? I have spent almost 5-6 hours trouble-shooting it; but cannot figure out Why is it redirecting to 127.0.0.1:80? Why I can access apache @ 192.168.2.10:80 but not django on 192.168.2.10:8000?? Below is my netstat Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp0 0 localhost:mysql *:* LISTEN - tcp0 0 *:netbios-ssn *:* LISTEN - tcp0 0 localhost:domain*:* LISTEN - tcp0 0 *:ssh *:* LISTEN - tcp0 0 localhost:ipp *:* LISTEN - tcp0 0 localhost:postgresql*:* LISTEN - tcp0 0 *:smtp *:* LISTEN - tcp0 0 localhost:5433 *:* LISTEN - tcp0 0 *:microsoft-ds *:* LISTEN - *tcp0 0 *:8000 *:* LISTEN 7547/python * tcp6 0 0 [::]:netbios-ssn[::]:* LISTEN - tcp6 0 0 [::]:ssh[::]:* LISTEN - tcp6 0 0 ip6-localhost:ipp [::]:* LISTEN - tcp6 0 0 [::]:smtp [::]:* LISTEN - tcp6 0 0 [::]:microsoft-ds [::]:* LISTEN - vik@vik-VirtualBox:~$ -- 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: New releases: Mezzanine, Cartridge, Drum
Thank You. Great work. On Sunday, July 26, 2015 at 9:46:24 AM UTC+5:30, Stephen McDonald wrote: Hi all, I've just released Mezzanine 4.0.1 which contains a small handful of bugfixes and improvements since the recent 4.0 release - most notably restoration of the --alternate option in the mezzanine-project command, which is used by Cartridge and Drum for creating new projects. Other changes include: - Prompt for superuser creation with createdb command is run without --noinput - Fixed issues when both modeltranslation and debug toolbar are installed - local_settings.py is now exec'd rather than imported, allowing it to reference values already defined in settings.py With that done, I've also pushed Cartridge 0.10 and Drum 0.3, both updated to support the new Mezzanine 4 project layout, using Django 1.7 or 1.8. While both these contains almost a year's worth of changes, they're mostly comprised of bugfixes and changes for compatibility with the latest Mezzanine and Django versions. As usual, you can view the full Mezzanine and Cartridge changelogs on their respective sites: http://mezzanine.jupo.org/docs/colophon.html#version-4-0-1-jul-26-2015 http://cartridge.jupo.org/colophon.html#version-0-10-0-jul-26-2015 Incidentally, I've also released django-overextends 0.4 with Django 1.7 and 1.8 compatbility, which is the overextends template tag that was born in Mezzanine (and is still bundled with it) that allows circular template inheritance: https://github.com/stephenmcd/django-overextends As always, a big thanks to everyone who was involved in the work contained in these releases. - -- 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/d/optout.
[mezzanine-users] Re: Support for multiple currencies?
I struggled with it for a while but finally have it working with some tweaks (replacing cartridge currency filter with custom) using the django-currencies app. cartridge has 'currency' filter defined in 'shop/templatetags/shop_tags.py' - this filter takes a single argument i.e. the value/amount django-currencies also has 'currency' filter in 'currency/templatetags/currency.py' - this filter takes 2 arguments i.e. value, currency code - I ReNamed this to custom-currency replaced currency filter with custom-currency filter in all the templates - 'a nasty fix but works' But I wonder in Cartridge - If locale is set every time currency filter is encountered in template; 'cartridge currency' filter code calls set_locale() which calls setlocale() which sets the currency locale set in settings.py. According to django documentation - setlocale is an expensive operation - It is generally a bad idea to call setlocale() in some library routine, since as a side effect it affects the entire program. Saving and restoring it is almost as bad: it is expensive and affects other threads that happen to run before the settings have been restored. My understanding is that locale should be set once on the server assuming a default currency; Then for the end-user the currency (exhange rate, symbol, format) should be changed in the template using some session variable according to user's currency choice Maybe stephen can comment on this. On Thursday, May 21, 2015 at 11:55:37 PM UTC+5:30, Ano Nymous wrote: Dear all, In cartridge, how can I set prices for different currencies? E.g. I have a product that has a price in CHF, EUR and USD. Users should be able to switch between them, independent of the currently selected language. Is this possible? Thanks, Claude -- 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] Mezzanine 4.0.0 and Cartridge 0.9.5
First of all congratulations and my thanks for the Mezzanine team for launching Mezzanine 4.0.0. I have been using the mezzanine(3.1.10)/cartridge app for a while for a small website and appreciate how well it has been working. Today, i tried to create another cartridge project as per cartridge installations and got the following $ mezzanine-project -a cartridge cartridge_second usage: mezzanine-project mezzanine_project [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--template TEMPLATE] [--extension EXTENSIONS] [--name FILES] name [directory] mezzanine-project mezzanine_project: error: unrecognized arguments: -a I see that stephen mentioned the following in one of the threads; I will try if it works for me and document it. - Create a new Mezzanine project (mezzanine-project project_name) - Copy settings.py and urls.py from cartridge/project_template into the new project (project_name/project_name) - In the copied settings.py, change from local_settings import * to from .local_settings import * (addition of a period to trigger relative import) I had a few questions though 1- Will there be a new release of cartridge integrated with mezzanine in near future and what would be the timeline? 2- Shall I upgrade to mezzanine 4.0.0 and django 1.8 versions for my current deployment (Cartridge==0.9.5, Django==1.6.8, Mezzanine 3.1.10) ? -- 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] https or SSL redirect for whole site in Cartridge
I chose the nginx approach and currently it is working fine. tweaked the nginx.conf for cipher and protocol settings to improve the security On Thursday, July 2, 2015 at 4:05:42 AM UTC+5:30, Josh Cartmell wrote: I would redirect with nginx and then set SSL_FORCED_PREFIXES_ONLY, https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/defaults.py#L440, to False in your settings.py file. That way Mezzanine won't try to redirect away from SSL ever. Alternatively you could probably do this in your settings.py: SSL_FORCE_URL_PREFIXES = ('/',) Good luck! On Wed, Jul 1, 2015 at 2:11 PM, vikraw vik...@gmail.com javascript: wrote: I was trying to configure SSL redirect for whole site using nginx.conf but was running into errors redirecting in ways that request will never be completed. After reading the mezzanine docs and django SECURE_PROXY_SSL_HEADER, I came with following way to enable SSL for whole site - the site pages are now being server over HTTPS but I am wary that it could creates big security holes as i change a default setting which is used in the SSLMiddleware logic by mezzanine. Here are my changes In my projects 'settings.py' - set SSL_FORCED_PREFIXES_ONLY = False modify 'nginx.conf' in deploy folder as follows add following server block server { listen 80; return 301 https://%(domains_nginx)s$request_uri; } modify default/provided server server { ### listen 80; comment it out listen 443 ssl; proxy_set_headerX-Forwarded-Protocol https; set it to https } Approach - 2 - The Recommended way I saw was to add all of the major prefixes to following setting SSL_FORCE_URL_PREFIXES SSL_ENABLED = True Any feedback on which one to use and why? I am not full aware of so many security options and protocols. I ran my site against QualSys - https://www.ssllabs.com/ssltest/analyze.html with the default fabric/cartridge deploy settings. The site gave a rating of C -- 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] https or SSL redirect for whole site in Cartridge
I was trying to configure SSL redirect for whole site using nginx.conf but was running into errors redirecting in ways that request will never be completed. After reading the mezzanine docs and django SECURE_PROXY_SSL_HEADER, I came with following way to enable SSL for whole site - the site pages are now being server over HTTPS but I am wary that it could creates big security holes as i change a default setting which is used in the SSLMiddleware logic by mezzanine. Here are my changes In my projects 'settings.py' - set SSL_FORCED_PREFIXES_ONLY = False modify 'nginx.conf' in deploy folder as follows add following server block server { listen 80; return 301 https://%(domains_nginx)s$request_uri; } modify default/provided server server { ### listen 80; comment it out listen 443 ssl; proxy_set_headerX-Forwarded-Protocol https; set it to https } Approach - 2 - The Recommended way I saw was to add all of the major prefixes to following setting SSL_FORCE_URL_PREFIXES SSL_ENABLED = True Any feedback on which one to use and why? I am not full aware of so many security options and protocols. I ran my site against QualSys - https://www.ssllabs.com/ssltest/analyze.html with the default fabric/cartridge deploy settings. The site gave a rating of C -- 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] Re: pip freeze insecure platform warning urllibe3
While i changed the owner of the directory, I did not update python as currently the default on ubuntu is 14.04 is python 2.7.6 as many forums there are warning of breaking dependencies if updated. I did not see the */home/ubuntu/.cache/pip/http *directory on another ubuntu installation even though both of them use the same cartridge deploy file. What is the purpose of this directory? On Thursday, June 11, 2015 at 4:08:22 AM UTC+5:30, Sam Kingston wrote: And for the other error, check that the ubuntu user is owner of the ~/.cache/pip/http directory. If not: $ sudo chown -R ubuntu:users */home/ubuntu/.cache/pip/http* On Thursday, 11 June 2015 04:48:00 UTC+10, vikraw wrote: *The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.* -- Sam Kingston Mobile: 0439 074 638 SJK Web Industries Web: www.sjkingston.com Brisbane, Qld, AustraliaEmail: s...@sjkwi.com.au javascript: -- 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] pip freeze insecure platform warning urllibe3
Not sure if it is the right forum. But since I am running cartridge, i am concerned about the security of the website. I am getting the following error when running pip freeze in my virtualenvironment cartirdge project it is an amazon-ec2 with ubuntu 14.04.2 LTS *The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag./home/ubuntu/.virtualenvs/projectname/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning* i have another amazon-ec2 machine with ubuntu 14.04.2 LTS and that machine is not complaning I read people suggesting to install the following - *sudo apt-get install -y libffi-dev libssl-dev *- which I did however, I get following *pip install requests[security]The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.Requirement already satisfied (use --upgrade to upgrade): requests[security] in /usr/lib/python2.7/dist-packages requests 2.2.1 does not provide the extra 'security'* -- 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] Changing default admin url doesn't work on fab deploy
I am using latest version of mezzanine. I have tried restarting nginx, gunicorn, supervisord strange thing is that the new admin link works for Staging deployed on a remote server with a public IP but no domain name But it doesn't work for Production on remote server with a domain name. I checked the urls.py in following locations and they have the new link - .virtualenvs/projectname/project - virtualenvs/projectname/project/projectname Any hints on where to look? On Wednesday, June 10, 2015 at 12:42:01 AM UTC+5:30, Eduardo Rivas wrote: Oh, by the way, are you running the stable or development version of Mezzanine? -- 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] postgres content/data syncing between development production
How can I sync the actual data in the database between development and production for postgres? new pages, products, description, Prices, Sales etc will be first checked in development. This has to be deployed to the production without overwriting/updating production relevant content ex: Past orders, User accounts, Stock Inventory, Sales, Discount codes etc.. -- 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] postgres content/data syncing between development production
So, what i understand is that both backup and restore tasks are run on the Depoyment/remote machine. when i do - fab deploy backup is taken (last.db) before any other tasks. restore is never called for task deploy South schema migrations are added to the directories in apps. these are uploaded to github and applied to remote machine. then a migrate command is run. But i am still confused how does the local database changes (adding new products) are applied to remote database? Is this also taken care by South (data migration..).. Because for me whenever i add a new page Or a product it never appears on the remote machine unless I copy my local database to remote manually Not sure what is not working for me.. Is it South migrations or another issues. -- 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] Changing default admin url doesn't work on fab deploy
I changed the admin url in urls.py. The changed url works fine in development when i run - python manage.py runserver However, when it is deployed the url is still the default i.e. site.com/admin the urls.py in project dir. on deployed machine has the new ^link/ in place but that doesn't work and the link is still at site.com/admin -- 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: [Django] ERROR: Invalid HTTP_HOST header: 'domain.com'.You may need to add u'domain.com' to..
My settings look like this ALLOWED_HOSTS = [ *'.mydomain.com', # Allow domain and subdomains'.mydomain.com.', # Also allow FQDN and subdomains u'mp-ip-add-ress',* ] I am getting the errors for my server's IP address Invalid HTTP_HOST header: 'x.x.x.x'. You may need to add u'x.x.x.x' to ALLOWED_HOSTS. BUT also for so many suspicious names like this - Invalid HTTP_HOST header: '4331780'.You may need to add u'4331780' to ALLOWED_HOSTS. - Invalid HTTP_HOST header: 'testp1.piwo.pila.pl'.You may need to add u'testp1.piwo.pila.pl' to ALLOWED_HOSTS. - Invalid HTTP_HOST header: 'www.cloud.ph'.You may need to add u'www.cloud.ph' to ALLOWED_HOSTS All of them say the following *No stack trace availableRequest repr() unavailable. * In the morning I have around 20-30 such emails.. On Monday, May 26, 2014 at 5:04:23 PM UTC+5:30, Federico Bruni wrote: I've been getting this error message since I've deployed my mezzanine website: [Django] ERROR: Invalid HTTP_HOST header: 'domain.com'.You may need to add u'domain.com' to ALLOWED_HOSTS where domain.com is most of the times the IP of the server, few times a secondary domain which redirects to the main one and one time www.fbi.gov :-) I've read the pages below, so I think that I can just ignore the error (I'm sure that my ALLOWED_HOSTS is restrictive). I guess that I can wait for Django = 1.7b4 in Mezzanine and then I won't get any error message. Right? http://stackoverflow.com/questions/15238506/djangos-suspiciousoperation-invalid-http-host-header https://code.djangoproject.com/ticket/19866 https://github.com/django/django/commit/d228c1192ed59ab0114d9eba82ac99df611652d2 (added in django 1.7b4) -- 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] [Django] ERROR: Invalid HTTP_HOST header: 'domain.com'.You may need to add u'domain.com'
I know there exists a similar post/thread before and I have posted there also, but I didn't see any solutions to stop getting those messages. I am getting around 20-30 such emails in a day My settings look like this ALLOWED_HOSTS = [ '.mydomain.com', # Allow domain and subdomains '.mydomain.com.', # Also allow FQDN and subdomains u'mp-ip-add-ress', ] I am getting the errors for my server's IP address Invalid HTTP_HOST header: 'x.x.x.x'. You may need to add u'x.x.x.x' to ALLOWED_HOSTS. BUT also for so many suspicious names like this - Invalid HTTP_HOST header: '4331780'.You may need to add u'4331780' to ALLOWED_HOSTS. - Invalid HTTP_HOST header: 'testp1.piwo.pila.pl'.You may need to add u'testp1.piwo.pila.pl' to ALLOWED_HOSTS. - Invalid HTTP_HOST header: 'www.cloud.ph'.You may need to add u'www.cloud.ph' to ALLOWED_HOSTS All of them say the following No stack trace available Request repr() unavailable. -- 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] Price Rounding Off Issues
here is the link - https://github.com/payu-india/PayU-Integration-Kit-Django But that package didn't work out of the box and it needed lots of tweaking. So that statement must have been introduced then, as their code doesn't has that. Payu-India support for django is not very extensive and as a small business our focus is on making things up and running first, perfection comes later. Also, I don't know how to make that package install automatically using pip/fabric. Currently, i manually copy the package and then run their install and then sync the code changes. On Tuesday, May 26, 2015 at 1:25:38 AM UTC+5:30, Stephen McDonald wrote: Well you've resolved it for yourself but surely someone else will hit this. So which payment processor was it? On Mon, May 25, 2015 at 9:45 AM, vikraw vik...@gmail.com javascript: wrote: Looks like it is resolved for now. One of the payment processor libs had getcontext().prec = 2. After commenting it out, things looks ok. Once the flow reached that code, i had issues. But still not clear why it hasn't happening on dev environment On Monday, May 25, 2015 at 2:46:19 AM UTC+5:30, Danny S wrote: Is it possible that you are running with different versions of python between the runserver and nginx/gunicorn versions of your website? I've noticed before in other work that e.g. Python 2.7 has slightly different precision on floats than Python 2.6... But yeah, weird problem. On 25/05/2015 3:45 AM, vikraw wrote: The staged server have the locale correctly set ( see at end of my message the settings). Steps on my Staged server - Amazon Ec2 - Ubuntu 14 - stopped supervisor and nginx on my staged machine - switched my staged machine to run using - python manage runserver 0.0.0.0:8000 - put printf value statement in the currency filter under shop_tags.py now when i browse (using windows machine) the site running on ec2 machine I have NO issues with the Product prices, Cart total etc..Both the Browser and the printf values match However, when I switch the machine to nginx and start browsing from windows machine, i start getting the incorrect prices (alternate between correct and wrong) when - I press the different products or go back and forth from cart to product pages - Switching between incorrect price and correct prices happens everytime when I goto my payment processor and click the back button again to website (neglecting browser warnings that page has expired). BUT this doesn't happens when site running from python manage runserver ex: Rs.249 is displayed as Rs.250 and Rs.349 as Rs.350. clicking the same link toggles between those 2 values Help is greatly appreciated as i am near completion and can't figure this ambiguous behavior. My development is on Local Machine a Ubuntu 12.01LTS and I was testing using python manage runserver on 127.0.0.0:8000... This is working as expected locale command on ubuntu-14 amazon-ec2 LANG=en_IN LANGUAGE=en_IN:en LC_CTYPE=en_IN LC_NUMERIC=en_IN LC_TIME=en_IN LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN LC_PAPER=en_IN LC_NAME=en_IN LC_ADDRESS=en_IN LC_TELEPHONE=en_IN LC_MEASUREMENT=en_IN LC_IDENTIFICATION=en_IN LC_ALL= The currencies symbol is correctly shown on the browser. However, i the prices change sometimes alternately and sometimes randomly. Correct price is 249. it switches between 249 and 250 when i click the same page or cart button. the cart total is updated On Saturday, May 23, 2015 at 10:59:37 PM UTC+5:30, Stephen McDonald wrote: It looks like you're calculating the correct value being stored in the DB, and only getting the error on output. Each currency value gets passed through the currency template tag, which is where the problem likely is. It also deals with machine specific locale settings, which will vary per machine - also making it a likely candidate for the error. Here's the source for it - https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/templatetags/shop_tags.py#L17-L41 Have you consistently defined (and installed) the correct locale? (defined with the SHOP_CURRENCY_LOCALE setting). Can you debug what happens in the currency template tag on your deployed machine? That might entail adding some logging to it, making a copy of it in your own project, printing out values while manually running it in a terminal, whatever works for you. On Sat, May 23, 2015 at 3:26 AM, vikraw vik...@gmail.com wrote: Hi Almost near launching a site. But running into Price rounding issues today when I fab deployed to AWS ec2 instance. Never had those issues before on ec2. My Development environment is working great with no issues. However on deployed machine -Prices are getting rounded off in various places ex: 249 was rounded off to 250 in cart.html, as well as HTML invoice, PDF invoice. Unit Price was displaying correctly as 249
Re: [mezzanine-users] Price Rounding Off Issues
The staged server have the locale correctly set ( see at end of my message the settings). Steps on my Staged server - Amazon Ec2 - Ubuntu 14 - stopped supervisor and nginx on my staged machine - switched my staged machine to run using - python manage runserver 0.0.0.0:8000 - put printf value statement in the currency filter under shop_tags.py now when i browse (using windows machine) the site running on ec2 machine I have NO issues with the Product prices, Cart total etc..Both the Browser and the printf values match However, when I switch the machine to nginx and start browsing from windows machine, i start getting the incorrect prices (alternate between correct and wrong) when - I press the different products or go back and forth from cart to product pages - Switching between incorrect price and correct prices happens everytime when I goto my payment processor and click the back button again to website (neglecting browser warnings that page has expired). BUT this doesn't happens when site running from python manage runserver ex: Rs.249 is displayed as Rs.250 and Rs.349 as Rs.350. clicking the same link toggles between those 2 values Help is greatly appreciated as i am near completion and can't figure this ambiguous behavior. My development is on Local Machine a Ubuntu 12.01LTS and I was testing using python manage runserver on 127.0.0.0:8000... This is working as expected locale command on ubuntu-14 amazon-ec2 LANG=en_IN LANGUAGE=en_IN:en LC_CTYPE=en_IN LC_NUMERIC=en_IN LC_TIME=en_IN LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN LC_PAPER=en_IN LC_NAME=en_IN LC_ADDRESS=en_IN LC_TELEPHONE=en_IN LC_MEASUREMENT=en_IN LC_IDENTIFICATION=en_IN LC_ALL= The currencies symbol is correctly shown on the browser. However, i the prices change sometimes alternately and sometimes randomly. Correct price is 249. it switches between 249 and 250 when i click the same page or cart button. the cart total is updated On Saturday, May 23, 2015 at 10:59:37 PM UTC+5:30, Stephen McDonald wrote: It looks like you're calculating the correct value being stored in the DB, and only getting the error on output. Each currency value gets passed through the currency template tag, which is where the problem likely is. It also deals with machine specific locale settings, which will vary per machine - also making it a likely candidate for the error. Here's the source for it - https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/templatetags/shop_tags.py#L17-L41 Have you consistently defined (and installed) the correct locale? (defined with the SHOP_CURRENCY_LOCALE setting). Can you debug what happens in the currency template tag on your deployed machine? That might entail adding some logging to it, making a copy of it in your own project, printing out values while manually running it in a terminal, whatever works for you. On Sat, May 23, 2015 at 3:26 AM, vikraw vik...@gmail.com javascript: wrote: Hi Almost near launching a site. But running into Price rounding issues today when I fab deployed to AWS ec2 instance. Never had those issues before on ec2. My Development environment is working great with no issues. However on deployed machine -Prices are getting rounded off in various places ex: 249 was rounded off to 250 in cart.html, as well as HTML invoice, PDF invoice. Unit Price was displaying correctly as 249 But Total Price was showing 250 Also, facing rounding off issues in PDF invoice and View Invoice in browser. The amounts are accurate in email invoice though. Even the amounts sent to payment gateway are correct. When the account user goes to history of orders, the amounts are correctly displayed in the columns. Only issues are cart, html invoice, pdf templates. I have a tax_handler where i calculate tax as follows - TAX_RATE = 0.05 tax_total = Decimal(amount_to_tax) * Decimal(str(settings.TAX_RATE)) See attached files - 366.45 is the correct amount being shown in Order-History page, but invoice is generated or 370. -- 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. -- 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/d/optout.
[mezzanine-users] Price Rounding Off Issues
Hi Almost near launching a site. But running into Price rounding issues today when I fab deployed to AWS ec2 instance. Never had those issues before on ec2. My Development environment is working great with no issues. However on deployed machine -Prices are getting rounded off in various places ex: 249 was rounded off to 250 in cart.html, as well as HTML invoice, PDF invoice. Unit Price was displaying correctly as 249 But Total Price was showing 250 Also, facing rounding off issues in PDF invoice and View Invoice in browser. The amounts are accurate in email invoice though. Even the amounts sent to payment gateway are correct. When the account user goes to history of orders, the amounts are correctly displayed in the columns. Only issues are cart, html invoice, pdf templates. I have a tax_handler where i calculate tax as follows - TAX_RATE = 0.05 tax_total = Decimal(amount_to_tax) * Decimal(str(settings.TAX_RATE)) See attached files - 366.45 is the correct amount being shown in Order-History page, but invoice is generated or 370. -- 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] Support for Different or Multiple Email Sending Addresses
Ok, your suggestion works for me. Thanks. But I saw another issue with resending email from User Accounts for Past Orders. When i go to the user account and View Past Orders - there is option to Resend Email here is how the link looks like for me - http://127.0.0.1:8000/shop/invoice/142/resend/?next=/account/orders/; When I click it there is an error - local variable 'redirect_to' referenced before assignment I tried to figure and I see in the view invoice_resend_email there is a condition if request.method == POST: For me this is never satisfied while I am in the View Past Orders. if I remove the condition of POST request, it works. Any thoughts on this Or shall i start another thread for it On Friday, May 15, 2015 at 11:14:41 PM UTC+5:30, Josh Cartmell wrote: If you go to the settings area of a gmail account (or google email account for your own domain) you can set up the ability to send mail as a different address, i.e. the ord...@abc.com javascript: account can be allowed to send mail as con...@abc.com javascript:. I'm not sure if that's called an alias, definitely may be. Good luck! On Fri, May 15, 2015 at 1:40 PM, vikraw vik...@gmail.com javascript: wrote: Josh, Thanks a lot. I will look into it and update if i can get it to work. So what you are suggesting is like creating an alias. On Friday, May 15, 2015 at 9:20:33 PM UTC+5:30, Josh Cartmell wrote: Hi vikraw, I don't think there is an easy way to specify multiple email users/backends like you have. Instead, I would recommend making it so that con...@abc.com can send mail as ord...@abc.com (or vice versa). I know that specifically with Google email this is fairly easy to set up. Then mail can be sent as either address through the same smtp connection. On Fri, May 15, 2015 at 8:39 AM, vikraw vik...@gmail.com wrote: How can I get Mezzanine/Cartridge to send emails from different email addresses for various purposes? - When the user submits the contact-form email should go from con...@abc.com - When the user makes a purchase, order receipt should go from ord...@abc.com In Settings-Shop section there is 'From Email' where I put the ord...@abc.com address. BUT there is no field to specify the password and other email settings In Contact-Us page there is 'From email' where I put the con...@abc.com address. Here also there is no field to specify the password and other email settings However, in *settings.py* file. I use the following, as business accounts with gmail. But the email always arrives from the email setting later in order in the file EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'con...@abc.com' EMAIL_HOST_PASSWORD = 'password' EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'ord...@abc.com' EMAIL_HOST_PASSWORD = 'password' Please help. Need to make it look business purpose -- 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/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-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] Support for Different or Multiple Email Sending Addresses
How can I get Mezzanine/Cartridge to send emails from different email addresses for various purposes? - When the user submits the contact-form email should go from cont...@abc.com - When the user makes a purchase, order receipt should go from ord...@abc.com In Settings-Shop section there is 'From Email' where I put the ord...@abc.com address. BUT there is no field to specify the password and other email settings In Contact-Us page there is 'From email' where I put the cont...@abc.com address. Here also there is no field to specify the password and other email settings However, in *settings.py* file. I use the following, as business accounts with gmail. But the email always arrives from the email setting later in order in the file EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'cont...@abc.com' EMAIL_HOST_PASSWORD = 'password' EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'ord...@abc.com' EMAIL_HOST_PASSWORD = 'password' Please help. Need to make it look business purpose -- 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] Support for Different or Multiple Email Sending Addresses
Josh, Thanks a lot. I will look into it and update if i can get it to work. So what you are suggesting is like creating an alias. On Friday, May 15, 2015 at 9:20:33 PM UTC+5:30, Josh Cartmell wrote: Hi vikraw, I don't think there is an easy way to specify multiple email users/backends like you have. Instead, I would recommend making it so that con...@abc.com javascript: can send mail as ord...@abc.com javascript: (or vice versa). I know that specifically with Google email this is fairly easy to set up. Then mail can be sent as either address through the same smtp connection. On Fri, May 15, 2015 at 8:39 AM, vikraw vik...@gmail.com javascript: wrote: How can I get Mezzanine/Cartridge to send emails from different email addresses for various purposes? - When the user submits the contact-form email should go from con...@abc.com javascript: - When the user makes a purchase, order receipt should go from ord...@abc.com javascript: In Settings-Shop section there is 'From Email' where I put the ord...@abc.com javascript: address. BUT there is no field to specify the password and other email settings In Contact-Us page there is 'From email' where I put the con...@abc.com javascript: address. Here also there is no field to specify the password and other email settings However, in *settings.py* file. I use the following, as business accounts with gmail. But the email always arrives from the email setting later in order in the file EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'con...@abc.com javascript:' EMAIL_HOST_PASSWORD = 'password' EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'ord...@abc.com javascript:' EMAIL_HOST_PASSWORD = 'password' Please help. Need to make it look business purpose -- 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] Reverse Tax Calcuation
I am trying to figure out a way to do reverse Tax calculation for Invoice Purposes, Here is the scenario, On product pages, the user only sees the Retail Price (Selling Price + Tax) i.e. the out of pocket price. But when the invoice is generated it should include have the breakdown for INDIVIDUAL items the following - Selling Price of Product (which would be lesser than Retail Price by the amount of Tax) - No of Units - Tax Type (VAT or Other Type) - Total Tax for Item - Item Total = no. of units X item price + total item_tax The order_totals only does total tax. I was trying to change the following templates shop/includes/order_details.html to have tax details for individual items. My Reverse calculation would be as follows - Individual Item tax = (item.price * tax_rate) / (100+tax_rate) - Selling Price = Retail Price - Individual Item tax I was thinking of doing the maths in order_details.html template but then I will need some math filters. Also, i am not sure if cartridge-tax will accomplish this? I am already using a custom order form and whether if I will have to change that if I use cartridge-tax How to go about it? -- 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] Missing pages after Mezzanine-Cartridg Deployme using Fabric - About/Blog/Category/Contact/Products
Ken, The links u sent mentioned of 'rsync' and now i got my setup working using - rsync(for static folder), pg_dump/restore(for database); then deleting the ghost migration errors!! Earlier i was using 'reserve' keyword with --delete-ghost-migrations which was throwing bunch of errors. removing that reserve word made everything work. However, i am still not sure how the default 'fab all' works out of box for other people. maybe i will discover someday. i tried more than 5-6 times 'fab all' (the default script) and None of the pages,images etc added to the cartridge shop section ever appear on aws. But for now everything is working as expected for me. Thank you ken for the help, till i run into something else On Tuesday, December 16, 2014 8:21:47 PM UTC+5:30, Kenneth Bolton wrote: On Tue, Dec 16, 2014 at 9:26 AM, vikraw vik...@gmail.com javascript: wrote: So to make my things work I commented out the - python syncdb and makemigrate commands in the fabfile - do manual local development database backup/dump - copy the dump to production server - restore the database using pg_restore command as stated above on prod. server - fab deploy on development machine to make any other changes available to prod. server Read this SO question and its answers https://www.google.com/url?q=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F13089163%2Fhow-to-fix-a-database-error-and-ghost-migration-error-in-djangosa=Dsntz=1usg=AFQjCNGAaAnE8ZMJUbQ0pL2cIT74LUUqQw regarding ghost migrations. I think --delete-ghost-migrations might be the flag you can run manually to clear up the problem. It is not clear what state your local database is in. I suggest that unless you have done a lot of work to the local database, you recreate it manually in production. It might have taken less time, depending on the depth of your content. - so i deleted the /static entry in gitignore file on development machine - ran collectstatic on development machine - git add, commit - fab deploy Spend some time reading the static files deployment documentation https://docs.djangoproject.com/en/dev/howto/static-files/deployment/ to get your head around how this works. The Fabric script just works for me when deploying to AWS. Make sure your settings.STATIC_URL and settings.STATIC_ROOT make sense. It is working for me right now, but I am not sure, if it is the right approach to get my static media displayed as well as syncing database? I think they are unrelated. Do further `fab deploy`s work as expected? Does the site/app behave as expected? Those are the points that really matter. Any inputs on my setup. My situation right now: - started learning web development 3 months back Good! Keep going. - laptop development production server Run a VM on your laptop rather than the runserver. - no Staging environment Run a staging VM on your laptop. Run `fab all` on it daily. -ken -- 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] Missing pages after Mezzanine-Cartridg Deployme using Fabric - About/Blog/Category/Contact/Products
Ken I was travelling so couldn't reply to this earlier. I am not using RDS. everything on Amazon free stuff; So i tried - pg_dump -Fc dbname dump.filename - On the development server sudo -u root sudo -u postgres pg_restore -c -d dbname /location/dump.filename - On the production However after this when i run fab deploy again on development server it breaks when it tries to run python manage syncdb remotely on prod. server. It complains about ghost migrations (something in database which is not on filesystem) /local/lib/python2.7/site-packages/south/migration/__init__.py, line 95, in check_migration_histories raise exceptions.GhostMigrations(ghosts) south.exceptions.GhostMigrations: ! These migrations are in the database but not on disk: shop: 0026_initial conf: 0005_initial core: 0007_initial generic: 0015_initial blog: 0021_initial forms: 0006_initial pages: 0015_initial galleries: 0002_initial twitter: 0003_initial ! I'm not trusting myself; either fix this yourself by fiddling ! with the south_migrationhistory table, or pass --delete-ghost-migrations ! to South to have it delete ALL of these records (this may not be good). So to make my things work I commented out the - python syncdb and makemigrate commands in the fabfile - do manual local development database backup/dump - copy the dump to production server - restore the database using pg_restore command as stated above on prod. server - fab deploy on development machine to make any other changes available to prod. server SECOND ISSUE - i was not seeing any static media (photos, css) even after running collectstatic on 'production' server. I was thinking that after running 'collectstatic' on the Production machine, it would make my static media available. however there were no product images in /project/static/media/product folder - so i deleted the /static entry in gitignore file on development machine - ran collectstatic on development machine - git add, commit - fab deploy It is working for me right now, but I am not sure, if it is the right approach to get my static media displayed as well as syncing database? Any inputs on my setup. My situation right now: - started learning web development 3 months back - I am single man army and trying to setup a website for a startup business using free tools (aws, django, mezzanine, cartridge). Looking into wordpress, woocommerce also - laptop development production server - no Staging environment On Thursday, December 11, 2014 9:29:09 PM UTC+5:30, Kenneth Bolton wrote: Hi Vikram, The danger of having `fab deploy` move your data from local to production is that an accidental `fab deploy` would overwrite your production database. This is fine when you are just getting started, but would be a problem going forward with each change to your code. I would caution against extending the `deploy` command to push your database. Instead, create Fabric functions that `local_backup` and `remote_restore`. Those would be run independently of the `deploy` command. To get a handle on the appropriate PostgreSQL commands, look at the fabfile: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L290-L303 Are you using RDS? Are you using a VPC? If you don't know, you most likely aren't, so don't sweat it. Keep learning and growing! best, ken On Thu, Dec 11, 2014 at 12:24 AM, vikraw vik...@gmail.com javascript: wrote: Thanks Kenneth for your reply. You understood the issue correctly. Yes, I am running Postgre locally. So if i understand correctly, here are my options 1- extend fabfile + add some keys to the settings.FABRIC 2- manually do a local backup and then run a restore on target deployment Option 2 looks easier to me at this moment. last night i tried running pg_restore on aws and was getting some peer authentication error which seems like some .conf/user accounts issue. However in future i would like to just run '*fab deploy*'. I am new to all these technologies and would appreciate if you could elaborate little more on *option 1* . thanks vikram On Thursday, December 11, 2014 12:09:21 AM UTC+5:30, Kenneth Bolton wrote: Hi Vikram, To restate your problem, you built a local cartridge instance and ran django's runserver against a local database. After deploying to AWS using `fab all` and an appropriately configured settings.FABRIC dictionary, you see none of the pages you added in your local instance. The fabfile that ships with Mezzanine does not move databases between deployment targets. If you are using PostgreSQL locally, the fabfile can be extended to do the dump for you. You will need to add some additional keys to settings.FABRIC for the local database that is to be backed up. hth, ken https://groups.google.com/forum/#!topic/mezzanine-users/X_Xs-Ei0OVw On Wed
[mezzanine-users] Missing pages after Mezzanine-Cartridg Deployme using Fabric - About/Blog/Category/Contact/Products
Hi I have been working on Mezzanine-Cartridge development for a few weeks on my local development machine. Now I deployed to a Ubuntu AMI on Amazon webservices using the default - Fabric.py script and 'fab all' command. However the following links are missing on the deployed site. - About - Blog - Category - Contact - Shop Products *Also I cannot see any additional products or added pages on deployed website. Attached is a pic of my the default DEPLOYED site https://lh6.googleusercontent.com/-Un7OEojIQDs/VIh6GblMhdI/CQg/hwWbPwLrtcE/s1600/Capture1.PNG Attached is a pic of my the default DEVELOPMENT LOCAL site https://lh6.googleusercontent.com/-Lviy9LJVjms/VIh3zfB8ddI/CQU/0hTybKIyNnE/s1600/Capture.PNG HOWEVER, I can see the above mentioned links in the development environment which is also on Ubuntu. Development environment is as follows - pip freeze o/p - using virtualenv Cartridge==0.9.5 Django==1.6.8 Fabric==1.10.0 Mezzanine==3.1.10 Pillow==2.6.1 South==1.0.1 argparse==1.2.1 beautifulsoup4==4.1.3 bleach==1.4 boto==2.34.0 django-appconf==0.6 django-compressor==1.4 django-ses==0.7.0 ecdsa==0.11 filebrowser-safe==0.3.6 future==0.9.0 grappelli-safe==0.3.13 html5lib==0.999 mezzanine-bsbanners==0.1.4 oauthlib==0.7.2 paramiko==1.15.1 psycopg2==2.5.4 pycrypto==2.6.1 pytz==2014.10 reportlab==3.1.8 requests==2.4.3 requests-oauthlib==0.4.2 six==1.8.0 tzlocal==1.0 wsgiref==0.1.2 xhtml2pdf==0.0.6 I was expecting that one's development is finalized and uploaded to the repository, FABRIC will automatically create a similar snapshot in production server. What should I do to get all my products and additional pages to come up on deployed site?? I read somewhere that fabric doesn't syncs the database even though it syncs the schema. So i am guessing if that is the issue? My excitement of development on Mezzanine-Cartridge is fading as deployment is very tedious. I follow the following process - virtualenv - debug=true - collectstatic - git add *, git commit , - fab all I would appreciate the help -- 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.