Re: [mezzanine-users] Re: Mezzanine 3.1.10: Can't delete the media files in the admin page

2018-02-14 Thread Simon Bradley
For anyone else using windows. There was another small issue.

This line in views.py:

# CREATE FILEOBJECT
url_path = "/".join([s.strip("/") for s in
[get_directory(), path, file] if s.strip("/")])

Changed it to:

# CREATE FILEOBJECT
url_path = "/".join([s.strip("/") for s in
[get_directory(), path.replace("\\", "/"), 
file] if s.strip("/")])


This might not be the best way to solve the problem but if you just want to 
get it working on windows it does seem to do the trick.



On Tuesday, February 13, 2018 at 8:28:42 AM UTC, Simon Bradley wrote:
>
> Will do.
>
> On Monday, February 12, 2018 at 10:28:00 PM UTC, Stephen McDonald wrote:
>>
>> Could you create a pull request with your fix? That'd be great, thank you.
>>
>> On Tue, Feb 13, 2018 at 7:14 AM, Simon Bradley  
>> wrote:
>>
>>> OK def fixed it now
>>>
>>> This line in the views.py of filebrowser-safe:
>>>
>>> if not normalized.startswith(get_directory()) or ".." in normalized:
>>>
>>> It appears to be the problem.
>>>
>>> I changed it to:
>>>
>>> if not normalized.startswith(get_directory().strip("/")) or ".." in 
>>> normalized:
>>>
>>> Removed the FILEBROWSER_DIRECTORY entry from the local_settings.py 
>>> because i generally stick with the default path anyway.
>>>
>>> Tested everything. Looks like it's working. I know there was a bit of a 
>>> false alarm before but this time i'm fairly sure.
>>>
>>> If there's a simpler way to get around this though i'd like to know it.
>>>
>>> It's a bit of a faff having to have my own version of filebrowser-safe 
>>> for every mez proj.
>>>
>>>
>>>
>>>
>>>
>>> On Monday, February 12, 2018 at 7:54:20 PM UTC, Simon Bradley wrote:
>>>>
>>>> A!
>>>>
>>>> Now i can't navigate in the media library.
>>>>
>>>> LOL!
>>>>
>>>> Still. Bound to be able to figure it out from here!
>>>>
>>>> On Monday, February 12, 2018 at 7:47:15 PM UTC, Simon Bradley wrote:
>>>>>
>>>>> Also, thanks to Mathias.
>>>>>
>>>>> It was your advice that led me to it.
>>>>>
>>>>> - Uninstalled filebrowser-safe
>>>>> - Cloned a fresh one from the repo
>>>>> - did setup.py develop
>>>>> - fiddled with the messages from delete
>>>>> - found said problem
>>>>>
>>>>>
>>>>> On Monday, February 12, 2018 at 7:43:46 PM UTC, Simon Bradley wrote:
>>>>>>
>>>>>> Well i found the problem.
>>>>>>
>>>>>> Very silly. Silly windows user.
>>>>>>
>>>>>> filebrowser-safe get_directory() picks up the directory from 
>>>>>> settings.py or the default 'uploads/' and it's as simple as that it 
>>>>>> seams.
>>>>>>
>>>>>> Because for it to work on windows the path needs to be 'uploads\'
>>>>>>
>>>>>> A backslash. That's it.
>>>>>>
>>>>>> So i just added this:
>>>>>>
>>>>>> FILEBROWSER_DIRECTORY = 'uploads\\'
>>>>>>
>>>>>> To my local_settings.py and now we're good.
>>>>>>
>>>>>> Hope this helps some people.
>>>>>>
>>>>>>
>>>>>> On Saturday, February 10, 2018 at 7:12:02 PM UTC, Simon Bradley wrote:
>>>>>>>
>>>>>>> Yo!
>>>>>>>
>>>>>>> Does anyone have any idea about this? Googling it seems to suggest 
>>>>>>> it has lingered for several years. It's a real annoyance because 
>>>>>>> overall i 
>>>>>>> really like mezzanine and have developed a couple of sites with it now. 
>>>>>>> I'm 
>>>>>>> also using windows 10 and everything else works great.
>>>>>>>
>>>>>>> Would be great if i had any kind of workaround for this.
>>>>>>>
>>>>>>> Anyone any idea?
>>>>>>>

Re: [mezzanine-users] Re: Mezzanine 3.1.10: Can't delete the media files in the admin page

2018-02-13 Thread Simon Bradley
Will do.

On Monday, February 12, 2018 at 10:28:00 PM UTC, Stephen McDonald wrote:
>
> Could you create a pull request with your fix? That'd be great, thank you.
>
> On Tue, Feb 13, 2018 at 7:14 AM, Simon Bradley  > wrote:
>
>> OK def fixed it now
>>
>> This line in the views.py of filebrowser-safe:
>>
>> if not normalized.startswith(get_directory()) or ".." in normalized:
>>
>> It appears to be the problem.
>>
>> I changed it to:
>>
>> if not normalized.startswith(get_directory().strip("/")) or ".." in 
>> normalized:
>>
>> Removed the FILEBROWSER_DIRECTORY entry from the local_settings.py 
>> because i generally stick with the default path anyway.
>>
>> Tested everything. Looks like it's working. I know there was a bit of a 
>> false alarm before but this time i'm fairly sure.
>>
>> If there's a simpler way to get around this though i'd like to know it.
>>
>> It's a bit of a faff having to have my own version of filebrowser-safe 
>> for every mez proj.
>>
>>
>>
>>
>>
>> On Monday, February 12, 2018 at 7:54:20 PM UTC, Simon Bradley wrote:
>>>
>>> A!
>>>
>>> Now i can't navigate in the media library.
>>>
>>> LOL!
>>>
>>> Still. Bound to be able to figure it out from here!
>>>
>>> On Monday, February 12, 2018 at 7:47:15 PM UTC, Simon Bradley wrote:
>>>>
>>>> Also, thanks to Mathias.
>>>>
>>>> It was your advice that led me to it.
>>>>
>>>> - Uninstalled filebrowser-safe
>>>> - Cloned a fresh one from the repo
>>>> - did setup.py develop
>>>> - fiddled with the messages from delete
>>>> - found said problem
>>>>
>>>>
>>>> On Monday, February 12, 2018 at 7:43:46 PM UTC, Simon Bradley wrote:
>>>>>
>>>>> Well i found the problem.
>>>>>
>>>>> Very silly. Silly windows user.
>>>>>
>>>>> filebrowser-safe get_directory() picks up the directory from 
>>>>> settings.py or the default 'uploads/' and it's as simple as that it seams.
>>>>>
>>>>> Because for it to work on windows the path needs to be 'uploads\'
>>>>>
>>>>> A backslash. That's it.
>>>>>
>>>>> So i just added this:
>>>>>
>>>>> FILEBROWSER_DIRECTORY = 'uploads\\'
>>>>>
>>>>> To my local_settings.py and now we're good.
>>>>>
>>>>> Hope this helps some people.
>>>>>
>>>>>
>>>>> On Saturday, February 10, 2018 at 7:12:02 PM UTC, Simon Bradley wrote:
>>>>>>
>>>>>> Yo!
>>>>>>
>>>>>> Does anyone have any idea about this? Googling it seems to suggest it 
>>>>>> has lingered for several years. It's a real annoyance because overall i 
>>>>>> really like mezzanine and have developed a couple of sites with it now. 
>>>>>> I'm 
>>>>>> also using windows 10 and everything else works great.
>>>>>>
>>>>>> Would be great if i had any kind of workaround for this.
>>>>>>
>>>>>> Anyone any idea?
>>>>>>
>>>>>> Anyone at all?
>>>>>>
>>>>>> I mean i spent a fair amount of time fiddling with it. Looking here: 
>>>>>> https://docs.python.org/3/library/os.html
>>>>>>
>>>>>> It says this: 
>>>>>> Although Windows supports chmod() 
>>>>>> <https://docs.python.org/3/library/os.html#os.chmod>, you can only 
>>>>>> set the file’s read-only flag with it (via the stat.S_IWRITE and 
>>>>>> stat.S_IREADconstants or a corresponding integer value). All other 
>>>>>> bits are ignored.
>>>>>>
>>>>>> Now i'm not really all that knowledgeable in this area but is that 
>>>>>> saying that because Mezzanine uses chmod that you can't actually change 
>>>>>> the 
>>>>>> file permissions on windows through mezzanine?
>>>>>>
>>>>>> If so could there be another way? Maybe changing the file permissions 
>>>>>> in windows explorer 

[mezzanine-users] Re: Mezzanine 3.1.10: Can't delete the media files in the admin page

2018-02-12 Thread Simon Bradley
OK def fixed it now

This line in the views.py of filebrowser-safe:

if not normalized.startswith(get_directory()) or ".." in normalized:
   
It appears to be the problem.

I changed it to:

if not normalized.startswith(get_directory().strip("/")) or ".." in 
normalized:
   
Removed the FILEBROWSER_DIRECTORY entry from the local_settings.py because 
i generally stick with the default path anyway.

Tested everything. Looks like it's working. I know there was a bit of a 
false alarm before but this time i'm fairly sure.

If there's a simpler way to get around this though i'd like to know it.

It's a bit of a faff having to have my own version of filebrowser-safe for 
every mez proj.





On Monday, February 12, 2018 at 7:54:20 PM UTC, Simon Bradley wrote:
>
> A!
>
> Now i can't navigate in the media library.
>
> LOL!
>
> Still. Bound to be able to figure it out from here!
>
> On Monday, February 12, 2018 at 7:47:15 PM UTC, Simon Bradley wrote:
>>
>> Also, thanks to Mathias.
>>
>> It was your advice that led me to it.
>>
>> - Uninstalled filebrowser-safe
>> - Cloned a fresh one from the repo
>> - did setup.py develop
>> - fiddled with the messages from delete
>> - found said problem
>>
>>
>> On Monday, February 12, 2018 at 7:43:46 PM UTC, Simon Bradley wrote:
>>>
>>> Well i found the problem.
>>>
>>> Very silly. Silly windows user.
>>>
>>> filebrowser-safe get_directory() picks up the directory from settings.py 
>>> or the default 'uploads/' and it's as simple as that it seams.
>>>
>>> Because for it to work on windows the path needs to be 'uploads\'
>>>
>>> A backslash. That's it.
>>>
>>> So i just added this:
>>>
>>> FILEBROWSER_DIRECTORY = 'uploads\\'
>>>
>>> To my local_settings.py and now we're good.
>>>
>>> Hope this helps some people.
>>>
>>>
>>> On Saturday, February 10, 2018 at 7:12:02 PM UTC, Simon Bradley wrote:
>>>>
>>>> Yo!
>>>>
>>>> Does anyone have any idea about this? Googling it seems to suggest it 
>>>> has lingered for several years. It's a real annoyance because overall i 
>>>> really like mezzanine and have developed a couple of sites with it now. 
>>>> I'm 
>>>> also using windows 10 and everything else works great.
>>>>
>>>> Would be great if i had any kind of workaround for this.
>>>>
>>>> Anyone any idea?
>>>>
>>>> Anyone at all?
>>>>
>>>> I mean i spent a fair amount of time fiddling with it. Looking here: 
>>>> https://docs.python.org/3/library/os.html
>>>>
>>>> It says this: 
>>>> Although Windows supports chmod() 
>>>> <https://docs.python.org/3/library/os.html#os.chmod>, you can only set 
>>>> the file’s read-only flag with it (via the stat.S_IWRITE and 
>>>> stat.S_IREADconstants or a corresponding integer value). All other 
>>>> bits are ignored.
>>>>
>>>> Now i'm not really all that knowledgeable in this area but is that 
>>>> saying that because Mezzanine uses chmod that you can't actually change 
>>>> the 
>>>> file permissions on windows through mezzanine?
>>>>
>>>> If so could there be another way? Maybe changing the file permissions 
>>>> in windows explorer somehow?
>>>>
>>>> Welcome a discussion here folks. I know someone out there knows more 
>>>> about this than i do. In fact i suspect their number may be legion.
>>>>
>>>>
>>>>
>>>>
>>>> On Wednesday, November 29, 2017 at 8:42:17 PM UTC, Alexander Yang wrote:
>>>>>
>>>>> Hi. I'm trying Mezzanine on Windows 10 and facing this same issue. I 
>>>>> can't delete images from the media library in the admin interface. Same 
>>>>> error message. Did you manage to solve this?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alex
>>>>>
>>>>>
>>>>> On Friday, 27 March 2015 02:41:22 UTC+1, Wan Hsin Mao wrote:
>>>>>>
>>>>>> I'm using the newest version of Mezzanine as my website CMS. There is 
>>>>>> always "An error occurred" message after  I click the trash can 
>>>>>> icon. Is there any way to find out what's going wrong or anything 
>>>>>> suggested 
>>>>>> that I can check to solve this error?
>>>>>>
>>>>>> p.s. I just want to delete the .ppt file in admin page.
>>>>>>
>>>>>

-- 
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: Mezzanine 3.1.10: Can't delete the media files in the admin page

2018-02-12 Thread Simon Bradley
A!

Now i can't navigate in the media library.

LOL!

Still. Bound to be able to figure it out from here!

On Monday, February 12, 2018 at 7:47:15 PM UTC, Simon Bradley wrote:
>
> Also, thanks to Mathias.
>
> It was your advice that led me to it.
>
> - Uninstalled filebrowser-safe
> - Cloned a fresh one from the repo
> - did setup.py develop
> - fiddled with the messages from delete
> - found said problem
>
>
> On Monday, February 12, 2018 at 7:43:46 PM UTC, Simon Bradley wrote:
>>
>> Well i found the problem.
>>
>> Very silly. Silly windows user.
>>
>> filebrowser-safe get_directory() picks up the directory from settings.py 
>> or the default 'uploads/' and it's as simple as that it seams.
>>
>> Because for it to work on windows the path needs to be 'uploads\'
>>
>> A backslash. That's it.
>>
>> So i just added this:
>>
>> FILEBROWSER_DIRECTORY = 'uploads\\'
>>
>> To my local_settings.py and now we're good.
>>
>> Hope this helps some people.
>>
>>
>> On Saturday, February 10, 2018 at 7:12:02 PM UTC, Simon Bradley wrote:
>>>
>>> Yo!
>>>
>>> Does anyone have any idea about this? Googling it seems to suggest it 
>>> has lingered for several years. It's a real annoyance because overall i 
>>> really like mezzanine and have developed a couple of sites with it now. I'm 
>>> also using windows 10 and everything else works great.
>>>
>>> Would be great if i had any kind of workaround for this.
>>>
>>> Anyone any idea?
>>>
>>> Anyone at all?
>>>
>>> I mean i spent a fair amount of time fiddling with it. Looking here: 
>>> https://docs.python.org/3/library/os.html
>>>
>>> It says this: 
>>> Although Windows supports chmod() 
>>> <https://docs.python.org/3/library/os.html#os.chmod>, you can only set 
>>> the file’s read-only flag with it (via the stat.S_IWRITE and 
>>> stat.S_IREADconstants or a corresponding integer value). All other bits 
>>> are ignored.
>>>
>>> Now i'm not really all that knowledgeable in this area but is that 
>>> saying that because Mezzanine uses chmod that you can't actually change the 
>>> file permissions on windows through mezzanine?
>>>
>>> If so could there be another way? Maybe changing the file permissions in 
>>> windows explorer somehow?
>>>
>>> Welcome a discussion here folks. I know someone out there knows more 
>>> about this than i do. In fact i suspect their number may be legion.
>>>
>>>
>>>
>>>
>>> On Wednesday, November 29, 2017 at 8:42:17 PM UTC, Alexander Yang wrote:
>>>>
>>>> Hi. I'm trying Mezzanine on Windows 10 and facing this same issue. I 
>>>> can't delete images from the media library in the admin interface. Same 
>>>> error message. Did you manage to solve this?
>>>>
>>>> Thanks,
>>>>
>>>> Alex
>>>>
>>>>
>>>> On Friday, 27 March 2015 02:41:22 UTC+1, Wan Hsin Mao wrote:
>>>>>
>>>>> I'm using the newest version of Mezzanine as my website CMS. There is 
>>>>> always "An error occurred" message after  I click the trash can icon. 
>>>>> Is there any way to find out what's going wrong or anything suggested 
>>>>> that 
>>>>> I can check to solve this error?
>>>>>
>>>>> p.s. I just want to delete the .ppt file in admin page.
>>>>>
>>>>

-- 
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: Mezzanine 3.1.10: Can't delete the media files in the admin page

2018-02-12 Thread Simon Bradley
Also, thanks to Mathias.

It was your advice that led me to it.

- Uninstalled filebrowser-safe
- Cloned a fresh one from the repo
- did setup.py develop
- fiddled with the messages from delete
- found said problem


On Monday, February 12, 2018 at 7:43:46 PM UTC, Simon Bradley wrote:
>
> Well i found the problem.
>
> Very silly. Silly windows user.
>
> filebrowser-safe get_directory() picks up the directory from settings.py 
> or the default 'uploads/' and it's as simple as that it seams.
>
> Because for it to work on windows the path needs to be 'uploads\'
>
> A backslash. That's it.
>
> So i just added this:
>
> FILEBROWSER_DIRECTORY = 'uploads\\'
>
> To my local_settings.py and now we're good.
>
> Hope this helps some people.
>
>
> On Saturday, February 10, 2018 at 7:12:02 PM UTC, Simon Bradley wrote:
>>
>> Yo!
>>
>> Does anyone have any idea about this? Googling it seems to suggest it has 
>> lingered for several years. It's a real annoyance because overall i really 
>> like mezzanine and have developed a couple of sites with it now. I'm also 
>> using windows 10 and everything else works great.
>>
>> Would be great if i had any kind of workaround for this.
>>
>> Anyone any idea?
>>
>> Anyone at all?
>>
>> I mean i spent a fair amount of time fiddling with it. Looking here: 
>> https://docs.python.org/3/library/os.html
>>
>> It says this: 
>> Although Windows supports chmod() 
>> <https://docs.python.org/3/library/os.html#os.chmod>, you can only set 
>> the file’s read-only flag with it (via the stat.S_IWRITE and 
>> stat.S_IREADconstants 
>> or a corresponding integer value). All other bits are ignored.
>>
>> Now i'm not really all that knowledgeable in this area but is that saying 
>> that because Mezzanine uses chmod that you can't actually change the file 
>> permissions on windows through mezzanine?
>>
>> If so could there be another way? Maybe changing the file permissions in 
>> windows explorer somehow?
>>
>> Welcome a discussion here folks. I know someone out there knows more 
>> about this than i do. In fact i suspect their number may be legion.
>>
>>
>>
>>
>> On Wednesday, November 29, 2017 at 8:42:17 PM UTC, Alexander Yang wrote:
>>>
>>> Hi. I'm trying Mezzanine on Windows 10 and facing this same issue. I 
>>> can't delete images from the media library in the admin interface. Same 
>>> error message. Did you manage to solve this?
>>>
>>> Thanks,
>>>
>>> Alex
>>>
>>>
>>> On Friday, 27 March 2015 02:41:22 UTC+1, Wan Hsin Mao wrote:
>>>>
>>>> I'm using the newest version of Mezzanine as my website CMS. There is 
>>>> always "An error occurred" message after  I click the trash can icon. 
>>>> Is there any way to find out what's going wrong or anything suggested that 
>>>> I can check to solve this error?
>>>>
>>>> p.s. I just want to delete the .ppt file in admin page.
>>>>
>>>

-- 
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: Mezzanine 3.1.10: Can't delete the media files in the admin page

2018-02-12 Thread Simon Bradley
Well i found the problem.

Very silly. Silly windows user.

filebrowser-safe get_directory() picks up the directory from settings.py or 
the default 'uploads/' and it's as simple as that it seams.

Because for it to work on windows the path needs to be 'uploads\'

A backslash. That's it.

So i just added this:

FILEBROWSER_DIRECTORY = 'uploads\\'

To my local_settings.py and now we're good.

Hope this helps some people.


On Saturday, February 10, 2018 at 7:12:02 PM UTC, Simon Bradley wrote:
>
> Yo!
>
> Does anyone have any idea about this? Googling it seems to suggest it has 
> lingered for several years. It's a real annoyance because overall i really 
> like mezzanine and have developed a couple of sites with it now. I'm also 
> using windows 10 and everything else works great.
>
> Would be great if i had any kind of workaround for this.
>
> Anyone any idea?
>
> Anyone at all?
>
> I mean i spent a fair amount of time fiddling with it. Looking here: 
> https://docs.python.org/3/library/os.html
>
> It says this: 
> Although Windows supports chmod() 
> <https://docs.python.org/3/library/os.html#os.chmod>, you can only set 
> the file’s read-only flag with it (via the stat.S_IWRITE and 
> stat.S_IREADconstants 
> or a corresponding integer value). All other bits are ignored.
>
> Now i'm not really all that knowledgeable in this area but is that saying 
> that because Mezzanine uses chmod that you can't actually change the file 
> permissions on windows through mezzanine?
>
> If so could there be another way? Maybe changing the file permissions in 
> windows explorer somehow?
>
> Welcome a discussion here folks. I know someone out there knows more about 
> this than i do. In fact i suspect their number may be legion.
>
>
>
>
> On Wednesday, November 29, 2017 at 8:42:17 PM UTC, Alexander Yang wrote:
>>
>> Hi. I'm trying Mezzanine on Windows 10 and facing this same issue. I 
>> can't delete images from the media library in the admin interface. Same 
>> error message. Did you manage to solve this?
>>
>> Thanks,
>>
>> Alex
>>
>>
>> On Friday, 27 March 2015 02:41:22 UTC+1, Wan Hsin Mao wrote:
>>>
>>> I'm using the newest version of Mezzanine as my website CMS. There is 
>>> always "An error occurred" message after  I click the trash can icon. 
>>> Is there any way to find out what's going wrong or anything suggested that 
>>> I can check to solve this error?
>>>
>>> p.s. I just want to delete the .ppt file in admin page.
>>>
>>

-- 
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: Mezzanine 3.1.10: Can't delete the media files in the admin page

2018-02-10 Thread Simon Bradley
Yo!

Does anyone have any idea about this? Googling it seems to suggest it has 
lingered for several years. It's a real annoyance because overall i really 
like mezzanine and have developed a couple of sites with it now. I'm also 
using windows 10 and everything else works great.

Would be great if i had any kind of workaround for this.

Anyone any idea?

Anyone at all?

I mean i spent a fair amount of time fiddling with it. Looking 
here: https://docs.python.org/3/library/os.html

It says this: 
Although Windows supports chmod() 
, you can only set the 
file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREADconstants 
or a corresponding integer value). All other bits are ignored.

Now i'm not really all that knowledgeable in this area but is that saying 
that because Mezzanine uses chmod that you can't actually change the file 
permissions on windows through mezzanine?

If so could there be another way? Maybe changing the file permissions in 
windows explorer somehow?

Welcome a discussion here folks. I know someone out there knows more about 
this than i do. In fact i suspect their number may be legion.




On Wednesday, November 29, 2017 at 8:42:17 PM UTC, Alexander Yang wrote:
>
> Hi. I'm trying Mezzanine on Windows 10 and facing this same issue. I can't 
> delete images from the media library in the admin interface. Same error 
> message. Did you manage to solve this?
>
> Thanks,
>
> Alex
>
>
> On Friday, 27 March 2015 02:41:22 UTC+1, Wan Hsin Mao wrote:
>>
>> I'm using the newest version of Mezzanine as my website CMS. There is 
>> always "An error occurred" message after  I click the trash can icon. Is 
>> there any way to find out what's going wrong or anything suggested that I 
>> can check to solve this error?
>>
>> p.s. I just want to delete the .ppt file in admin page.
>>
>

-- 
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] Session variables in Cartridge checkout steps

2017-10-27 Thread Simon Bradley
Hi

So i've been customising Cartridge to work with a booking system for a 
while.

I think i've almost got the basic processes working correctly.

But, i have one thing currently that i don't quite understand.

I'm using Stripe for payments and at the payment page step i am creating a 
customer with the payment handler. That works fine.

The problem is that i cant seem to add the returned customer id to the 
session with request.session['order']['stripe_customer_id'] = customer_id

However, i can do it perfectly well with 
request.session['stripe_customer_id'] = customer_id. But now i just want to 
understand why it doesn't work the other way.

Now i know that changing request.session['foo']['bar'] means it doesn't 
know it's been modified.

But the checkout steps function calls request.session.modified = True at 
the end when it sets request.session['order']['step'] so it should know to 
update.

I even added in request.session.modified = True below where i've added the 
['stripe_customer_id'] but its made no difference.

The point where i'm adding the ['stripe_customer_id'] is above the final 
confirmation step where it saves the order. Just in case that's relevant.

I'm starting to think this is just me not understanding how the Django 
sessions work as I'm still learning Django.

Would really appreciate some advice on this one folks as i've reached the 
stage where i'm going round in circles.

Cheers.


-- 
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: example.com!

2017-08-26 Thread Simon Bradley
Hi

Thanks for the responses.

Can't believe i've been using Mezzanine for this long without noticing that!

Bit of a silly one really.

Move along. Nothing to see here!


On Thursday, August 24, 2017 at 11:55:27 PM UTC+1, Simon Bradley wrote:
>
> Hi
>
> The View on Site button has started doing something quite unusual.
>
> Now when i press it, it replaces localhost with example.com!
>
> I'm starting to doubt myself here. Did it always do that? I don't think it 
> did.
>
> So when i hover over the button i can see the link at the bottom. 
> Something like: http://127.0.0.1:8000/en/admin/r/16/9/
>
> An then when i press the button it takes me to example.com/ and 
> everything after that slash is as it should be!
>
> Any ideas? Mind = boggled.
>
> Cheers.
>

-- 
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] example.com!

2017-08-24 Thread Simon Bradley
Hi

The View on Site button has started doing something quite unusual.

Now when i press it, it replaces localhost with example.com!

I'm starting to doubt myself here. Did it always do that? I don't think it 
did.

So when i hover over the button i can see the link at the bottom. Something 
like: http://127.0.0.1:8000/en/admin/r/16/9/

An then when i press the button it takes me to example.com/ and everything 
after that slash is as it should be!

Any ideas? Mind = boggled.

Cheers.

-- 
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: Cartridge customisation

2017-08-16 Thread Simon Bradley
Hi

Thanks for the replies.

There looks to be some good options for scheduling out there so that should 
help enormously.

I'm not familiar with github (I've been using subversion for version 
control) but its probably time i started anyway.

I've just forked it now so i'll have a fiddle with it today.

Thanks very much for the advice. 

Very much appreciated.

Simon.




On Tuesday, August 15, 2017 at 4:36:25 PM UTC+1, Simon Bradley wrote:
>
> Hi
>
> I've read a lot of posts about customising cartridge but they tend to be 
> issue specific.
>
> I've only just started using mezzanine and cartridge and while i've found 
> mezzanine very easy to bend to my will, i'm struggling with how to 
> customise cartridge.
>
> I'm trying to build a location booking system.
>
> It's really easy to get the default shop up and running which is 
> fantastic. I've done that and added various products with the admin 
> interface and that all works great.
>
> Now i want to customise the product view to remove the quantity field and 
> to add from and to dates. Just basic booking stuff like you'd get on 
> booking.com. The simple way appears to be to just edit the model but then 
> what happens if i want to update my installed version of cartridge? That's 
> a real concern if there's a security issue. And of course i'd like to avoid 
> building in my own security problems!
>
> I've read through the docs on integration and sub classing the order form 
> and then removing the fields i dont want (Which is most of them). I dont 
> need shipping and what have you either because there's no physical product.
>
> However, it seems on the face of it to be much simpler to just edit the 
> models.
>
> So, i was wondering if there's a way to make these fairly simple 
> modifications without just copying the cartridge folder into my project and 
> hacking it to pieces and then making the necessary migrations! Or is that 
> common?
>
> Sorry this sounds so clueless, I'm really just looking for some sound 
> advice.
>
> Cheers.
>
>
>
>
>

-- 
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] Cartridge customisation

2017-08-15 Thread Simon Bradley
Hi

I've read a lot of posts about customising cartridge but they tend to be 
issue specific.

I've only just started using mezzanine and cartridge and while i've found 
mezzanine very easy to bend to my will, i'm struggling with how to 
customise cartridge.

I'm trying to build a location booking system.

It's really easy to get the default shop up and running which is fantastic. 
I've done that and added various products with the admin interface and that 
all works great.

Now i want to customise the product view to remove the quantity field and 
to add from and to dates. Just basic booking stuff like you'd get on 
booking.com. The simple way appears to be to just edit the model but then 
what happens if i want to update my installed version of cartridge? That's 
a real concern if there's a security issue. And of course i'd like to avoid 
building in my own security problems!

I've read through the docs on integration and sub classing the order form 
and then removing the fields i dont want (Which is most of them). I dont 
need shipping and what have you either because there's no physical product.

However, it seems on the face of it to be much simpler to just edit the 
models.

So, i was wondering if there's a way to make these fairly simple 
modifications without just copying the cartridge folder into my project and 
hacking it to pieces and then making the necessary migrations! Or is that 
common?

Sorry this sounds so clueless, I'm really just looking for some sound 
advice.

Cheers.




-- 
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] Thumbnail creation

2017-08-02 Thread Simon Bradley
No probs mate.

Glad it helped.

On Wednesday, August 2, 2017 at 12:35:24 PM UTC+1, Roger van Schie wrote:
>
> Hi Simon
>
> Thanks for this. I've noticed the same problem but haven't had time to dig 
> into it yet. You've just saved me a bunch of time!
>
> Cheers
> Roger
>
> On 2 August 2017 at 09:37, Simon Bradley  > wrote:
>
>> Hi
>>
>> This is sort of an answer rather than a question.
>>
>> I had an existing Mezzanine project and i added Cartridge to it. I 
>> installed Cartridge with 'pip install cartridge' so i assume it's the most 
>> recent version.
>>
>> I found that after the Cartridge install the Mezzanine admin wasn't 
>> generating thumbnails for images that i added to the media library. I 
>> noticed it right away because when i added an image to the media library it 
>> displayed as full size in the list of images after the upload.
>>
>> I noticed .png's were still working after some faffing about so it was 
>> just .jpeg's then.
>>
>> With that in mind i thought maybe Cartridge installed a newer version of 
>> Pillow that wasn't working correctly.
>>
>> I did 'pip uninstall pillow' followed by pip install 'pillow >= 2.0.0, < 
>> 4.0.0' and Mezzanine started generating the thumbnails correctly again.
>>
>> I've only just started using Mezzanine and i only installed cartridge a 
>> couple of days ago so i'm no expert, but i thought this info might be 
>> useful to someone else who has just started like me.
>>
>> Boom!
>>
>> -- 
>> 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] Thumbnail creation

2017-08-02 Thread Simon Bradley
Hi

This is sort of an answer rather than a question.

I had an existing Mezzanine project and i added Cartridge to it. I 
installed Cartridge with 'pip install cartridge' so i assume it's the most 
recent version.

I found that after the Cartridge install the Mezzanine admin wasn't 
generating thumbnails for images that i added to the media library. I 
noticed it right away because when i added an image to the media library it 
displayed as full size in the list of images after the upload.

I noticed .png's were still working after some faffing about so it was just 
.jpeg's then.

With that in mind i thought maybe Cartridge installed a newer version of 
Pillow that wasn't working correctly.

I did 'pip uninstall pillow' followed by pip install 'pillow >= 2.0.0, < 
4.0.0' and Mezzanine started generating the thumbnails correctly again.

I've only just started using Mezzanine and i only installed cartridge a 
couple of days ago so i'm no expert, but i thought this info might be 
useful to someone else who has just started like me.

Boom!

-- 
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] Can't delete files from Media Library

2017-08-01 Thread Simon Bradley
When i click the trash can i get an error that says: an error has occurred!

Thought it might be a file permissions thing but i set everything in the 
security tab to have full control and the error is still happening.

The demo site works fine.

Something to do with windows 10 maybe?

Would really appreciate a bit of advice here.

Cheers.

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