[mezzanine-users] SSL Help
I must be missing something, but the last few Nginx + Cartridge sites I have launched I have to https the whole the site. If I don't the sections I need SSL on just do a 302 redirect loop. Here are my settings: SSL_ENABLED = True SSL_FORCE_URL_PREFIXES = ('/shop/cart','/shop/checkout','/account','/admin') SSL_FORCED_PREFIXES_ONLY = True I also enabled the SSL middleware. My Nginx config matches the one provided. Thoughts? -- 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] SSL Help
I've had issues with redirects and SSL before if I put in the wrong "Force host" which is a backend editable setting. On Fri, Nov 14, 2014 at 3:19 AM, Josh B wrote: > I must be missing something, but the last few Nginx + Cartridge sites I > have launched I have to https the whole the site. If I don't the sections I > need SSL on just do a 302 redirect loop. > > Here are my settings: > > SSL_ENABLED = True > SSL_FORCE_URL_PREFIXES = ('/shop/cart','/shop/checkout','/account', > '/admin') > SSL_FORCED_PREFIXES_ONLY = True > > I also enabled the SSL middleware. > > My Nginx config matches the one provided. > > Thoughts? > > -- > 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] SSL Help
Thanks, Josh. I have tried with that set or left blank and I get the same thing. I have also removed the SSL config parameters and just use default ones and I still get the redirect. Looking through all of the Cartridge sites I have built this is the issue that has always alluded me. On Friday, November 14, 2014 8:22:13 AM UTC-7, Josh Cartmell wrote: > > I've had issues with redirects and SSL before if I put in the wrong "Force > host" which is a backend editable setting. > > On Fri, Nov 14, 2014 at 3:19 AM, Josh B > wrote: > >> I must be missing something, but the last few Nginx + Cartridge sites I >> have launched I have to https the whole the site. If I don't the sections I >> need SSL on just do a 302 redirect loop. >> >> Here are my settings: >> >> SSL_ENABLED = True >> SSL_FORCE_URL_PREFIXES = ('/shop/cart','/shop/checkout','/account', >> '/admin') >> SSL_FORCED_PREFIXES_ONLY = True >> >> I also enabled the SSL middleware. >> >> My Nginx config matches the one provided. >> >> Thoughts? >> >> -- >> 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-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[mezzanine-users] "Last updated" date on pages
I'd like to add a "last modified" date to the bottom of my pages. I see the Rich Text page already stores Published and Expires dates, but I'd like to automatically set an Updated date for when I make changes. I know its possible to modify Mezzanine itself to have this feature but could I make that change locally to my project or do I need to make it to the actual mezzanine files (as installed by pip in my virtualenv)? I'm fairly new to both Django and Mezzanine so if I'm missing something that's already implemented, please let me know. 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/d/optout.
Re: [mezzanine-users] "Last updated" date on pages
Hey Michael, the last modified is actually already stored with the page. Page inherits from Displayable and Displayable inherits from TimeStamped, https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/models.py#L179 TimeStamped has created and updated DateTimeFields. So in your template you could do something like: {{ page.updated }} Good luck! On Fri, Nov 14, 2014 at 2:29 PM, Michael Babcock wrote: > I'd like to add a "last modified" date to the bottom of my pages. I see > the Rich Text page already stores Published and Expires dates, but I'd like > to automatically set an Updated date for when I make changes. > > I know its possible to modify Mezzanine itself to have this feature but > could I make that change locally to my project or do I need to make it to > the actual mezzanine files (as installed by pip in my virtualenv)? > > I'm fairly new to both Django and Mezzanine so if I'm missing something > that's already implemented, please let me know. > > 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/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] Gallery image upload
Hi All, I have spent a few hours trying to figure out how to upload gallery images on a fresh install. At the moment I am trying to upload a zipfile of images. I select my zip file, click save and the site tells me the gallery was update successfully, but not whether my zip file was uploaded. When I browse to the gallery I have no images. I have no feedback of success or failure, so I have been playing with directory permissions thinking it might be that.. No success so far. I am on version 3.0.9. Any ideas what might be happening? Thanks Darin -- 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: Gallery image upload
update: I stepped through the code and found that it didnt like my zip file. So creating another one from windows has allowed it to upload an image... Unfortunately it only loads one of the many images now, so trying to work out why... On Saturday, 15 November 2014 09:52:14 UTC+13, Darin Gillies wrote: > > Hi All, I have spent a few hours trying to figure out how to upload > gallery images on a fresh install. > > At the moment I am trying to upload a zipfile of images. I select my zip > file, click save and the site tells me the gallery was update successfully, > but not whether my zip file was uploaded. > > When I browse to the gallery I have no images. > > I have no feedback of success or failure, so I have been playing with > directory permissions thinking it might be that.. No success so far. > > I am on version 3.0.9. > > Any ideas what might be happening? > > Thanks > > Darin > -- 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] "Last updated" date on pages
Exactly what I needed to know; thanks, works perfectly. Now to massage the date display a little... On Friday, November 14, 2014 2:54:29 PM UTC-5, Josh Cartmell wrote: > > Hey Michael, the last modified is actually already stored with the page. > Page inherits from Displayable and Displayable inherits from TimeStamped, > https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/models.py#L179 > > TimeStamped has created and updated DateTimeFields. > > So in your template you could do something like: > > {{ page.updated }} > > Good luck! > > On Fri, Nov 14, 2014 at 2:29 PM, Michael Babcock > wrote: > >> I'd like to add a "last modified" date to the bottom of my pages. I see >> the Rich Text page already stores Published and Expires dates, but I'd like >> to automatically set an Updated date for when I make changes. >> >> I know its possible to modify Mezzanine itself to have this feature but >> could I make that change locally to my project or do I need to make it to >> the actual mezzanine files (as installed by pip in my virtualenv)? >> >> I'm fairly new to both Django and Mezzanine so if I'm missing something >> that's already implemented, please let me know. >> >> 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-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-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] SSL Help
Finally tracked down the solution. The request.is_secure(); isn't looking for the HTTP_X_FORWARDED_PROTOCOL to test for HTTPS so its always returning that its not secure. To fix it I had to add the below to my settings.py file. SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') Also I see that line in the deploy local_settings.py.template file. On Friday, November 14, 2014 9:08:57 AM UTC-7, Josh B wrote: > > Thanks, Josh. > > I have tried with that set or left blank and I get the same thing. I have > also removed the SSL config parameters and just use default ones and I > still get the redirect. Looking through all of the Cartridge sites I have > built this is the issue that has always alluded me. > > On Friday, November 14, 2014 8:22:13 AM UTC-7, Josh Cartmell wrote: >> >> I've had issues with redirects and SSL before if I put in the wrong >> "Force host" which is a backend editable setting. >> >> On Fri, Nov 14, 2014 at 3:19 AM, Josh B >> wrote: >> >>> I must be missing something, but the last few Nginx + Cartridge sites I >>> have launched I have to https the whole the site. If I don't the sections I >>> need SSL on just do a 302 redirect loop. >>> >>> Here are my settings: >>> >>> SSL_ENABLED = True >>> SSL_FORCE_URL_PREFIXES = ('/shop/cart','/shop/checkout','/account', >>> '/admin') >>> SSL_FORCED_PREFIXES_ONLY = True >>> >>> I also enabled the SSL middleware. >>> >>> My Nginx config matches the one provided. >>> >>> Thoughts? >>> >>> -- >>> 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-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.