How to automatically redirect each admin user to its own, private directory ?

20 views
Skip to first unread message

Ambroise Rongère

unread,
Oct 7, 2013, 4:50:27 AM10/7/13
to djangofi...@googlegroups.com
Hello,

I know this kind of question has already been asked, but as far as my reseaches have lead me, there was not a single valid answer... I am, mainly for resources reasons, using the django admin as a crud interface for different users.

The Filebrowser app and Grappelli are great and perfectly fit my needs except for this one thing : I need to separate files and directories based upon the user logged in at request time. They must not be able to see or change any of the other admin users files.

I've thought about accessing and setting the directory variable of filebrowser based on the current user, but I honestly wouldn't know where to begin, nor would I know it is even possible.

What about multiple filebrowser sites associated to a single admin ? I have to admit I didn't really get how to use this new feature.

I would greatly appreciate it if you could give me some help in order to do so.

In any way, thanks for your awesome apps !

Regards,

Ambroise

patrick kranzlmueller

unread,
Oct 7, 2013, 5:37:38 AM10/7/13
to djangofi...@googlegroups.com
I don't recommend using multiple sites for what you're trying to do ... instead try to set the directory property with your filebrowser–site. you could use the browse method (which gets the request variable) in order to set "directory". unfortunately that means to hack the filebrowser, but I currently don't see any other solution.

regards,
patrick



2013/10/7 Ambroise Rongère <ambr...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Django FileBrowser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to djangofilebrow...@googlegroups.com.
To post to this group, send email to djangofi...@googlegroups.com.
Visit this group at http://groups.google.com/group/djangofilebrowser.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages