Re: [mezzanine-users] Filetypes for Media Library

2015-03-26 Thread Josh Cartmell
Glad to help Danny, and I'm glad you figured out the correct setting names,
I didn't look quite closely enough ;)

I'm not sure about those idiosyncrasys but if you do figure something out,
please let us know!

On Wed, Mar 25, 2015 at 5:23 PM, Danny molo...@gmail.com wrote:

 Thanks Josh, super helpful :D Works like a charm - the name of the
 settings to put in my own settings.py are FILEBROWSER_EXTENSIONS and
 FILEBROWSER_SELECT_FORMATS but that was fairly obvious from the code you
 pointed to.

 I find it somewhat curious that, for, e.g. the Media Library upload, the
 file dialog shows a concatenation of all the EXTENSIONS available (rather
 than just say All Files), whereas if you choose to upload an image for a
 product, it actually gives All Files rather than restricting it to
 images...

 Haven't tried the Gallery, but given your pointer to the code, I'd assume
 there it's restricted to Images...

 Seeya. Danny.

 On 26/03/2015 12:53 AM, Josh Cartmell wrote:

 Hi Danny, they are defined here:
 https://github.com/stephenmcd/filebrowser-safe/blob/master/
 filebrowser_safe/settings.py#L43

 You can override either EXTENSIONS or SELECT_FORMATS or both in your
 projects settings.py file.  The SELECT_FORMS are what filebrowser uses
 to determine what are valid extensions for a particular FileField.  For
 example, in Mezzanine's galleries,
 https://github.com/stephenmcd/mezzanine/blob/master/
 mezzanine/galleries/models.py#L120,
 the format of the image FileField is set to Image.

 Good luck!

 On Wed, Mar 25, 2015 at 2:34 AM, Danny molo...@gmail.com
 mailto:molo...@gmail.com wrote:

 Hi all,

 Probably a very simple question, but where are the filetypes for the
 Media Library defined, and can I override them?

 If I go into my Media Library, and choose to Upload a file, the file
 browser window I'm presented with has the following options:

 *.html; *.py; *.js; *.css; *.jpg; *.jpeg; ... and several more

 However, some useful ones are missing (like MS Word's docx) and
 even this selected list fails to show up PDFs in my current
 directory even though *.pdf is one of the options (I suspect it's
 too long for Windows liking).

 The other bad thing is that the file type drop down doesn't have the
 All Files (*.*) option that you may be used to seeing.

 I'm sure that there would be a nice easy setting somewhere that
 controls
 this, the question is: where is it?

 Thanks,

 Seeya. Danny.

 --
 Email: molo...@gmail.com mailto:molo...@gmail.com

 --
 You received this message because you are subscribed to the Google
 Groups Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to mezzanine-users+unsubscribe@__googlegroups.com
 mailto:mezzanine-users%2bunsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/__optout
 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
 mailto:mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




 --
 Email: molo...@gmail.com

 --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/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] Filetypes for Media Library

2015-03-25 Thread Danny

Hi all,

Probably a very simple question, but where are the filetypes for the 
Media Library defined, and can I override them?


If I go into my Media Library, and choose to Upload a file, the file 
browser window I'm presented with has the following options:


*.html; *.py; *.js; *.css; *.jpg; *.jpeg; ... and several more

However, some useful ones are missing (like MS Word's docx) and
even this selected list fails to show up PDFs in my current directory 
even though *.pdf is one of the options (I suspect it's too long for 
Windows liking).


The other bad thing is that the file type drop down doesn't have the 
All Files (*.*) option that you may be used to seeing.


I'm sure that there would be a nice easy setting somewhere that controls
this, the question is: where is it?

Thanks,

Seeya. Danny.

--
Email: molo...@gmail.com

--
You received this message because you are subscribed to the Google Groups Mezzanine 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Filetypes for Media Library

2015-03-25 Thread Danny
Thanks Josh, super helpful :D Works like a charm - the name of the 
settings to put in my own settings.py are FILEBROWSER_EXTENSIONS and 
FILEBROWSER_SELECT_FORMATS but that was fairly obvious from the code you 
pointed to.


I find it somewhat curious that, for, e.g. the Media Library upload, the 
file dialog shows a concatenation of all the EXTENSIONS available 
(rather than just say All Files), whereas if you choose to upload an 
image for a product, it actually gives All Files rather than 
restricting it to images...


Haven't tried the Gallery, but given your pointer to the code, I'd 
assume there it's restricted to Images...


Seeya. Danny.

On 26/03/2015 12:53 AM, Josh Cartmell wrote:

Hi Danny, they are defined here:
https://github.com/stephenmcd/filebrowser-safe/blob/master/filebrowser_safe/settings.py#L43

You can override either EXTENSIONS or SELECT_FORMATS or both in your
projects settings.py file.  The SELECT_FORMS are what filebrowser uses
to determine what are valid extensions for a particular FileField.  For
example, in Mezzanine's galleries,
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/galleries/models.py#L120,
the format of the image FileField is set to Image.

Good luck!

On Wed, Mar 25, 2015 at 2:34 AM, Danny molo...@gmail.com
mailto:molo...@gmail.com wrote:

Hi all,

Probably a very simple question, but where are the filetypes for the
Media Library defined, and can I override them?

If I go into my Media Library, and choose to Upload a file, the file
browser window I'm presented with has the following options:

*.html; *.py; *.js; *.css; *.jpg; *.jpeg; ... and several more

However, some useful ones are missing (like MS Word's docx) and
even this selected list fails to show up PDFs in my current
directory even though *.pdf is one of the options (I suspect it's
too long for Windows liking).

The other bad thing is that the file type drop down doesn't have the
All Files (*.*) option that you may be used to seeing.

I'm sure that there would be a nice easy setting somewhere that controls
this, the question is: where is it?

Thanks,

Seeya. Danny.

--
Email: molo...@gmail.com mailto:molo...@gmail.com

--
You received this message because you are subscribed to the Google
Groups Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it,
send an email to mezzanine-users+unsubscribe@__googlegroups.com
mailto:mezzanine-users%2bunsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/__optout
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
mailto:mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




--
Email: molo...@gmail.com

--
You received this message because you are subscribed to the Google Groups Mezzanine 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.