django authentication .htaccess static
Posted
by Uszy Wieloryba
on Stack Overflow
See other posts from Stack Overflow
or by Uszy Wieloryba
Published on 2010-05-06T12:03:24Z
Indexed on
2010/05/06
12:08 UTC
Read the original article
Hit count: 373
In my app users can upload files for other users. To make the uploaded files accesible only for the addresse I need some kind of static files authentication system.
My idea, is to create the apache hosted directory for each user and to limit access to this derectory using .htaccess.
This means that each time new django user is created, I need to create a directory and the appropriate .htaccess file in it. I know I should do it using post_save signals on User model but I don't know how to create the .htaccess in the user's directory from python level. Can you help me with that?
Or perhaps you have better solution to my problem?
© Stack Overflow or respective owner