I am creating a private genealogy web page of pictures/obituaries/data files/census records etc... all just a set of files within a directory structure. I just want Apache to index the directory's contents and the files within them and serve them over the web. That works fine. Then I wanted to restrict access, which also worked fine using standard .htaccess authentication.That works fine also,
But then I want to integrate that into my django web page, and restrict access using the django user database instead of the external user database. When I set the contents of my .htaccess files as follows: AuthType Basic AuthName "jlcarroll.net" Require valid-user SetEnv DJANGO_SETTINGS_MODULE django_smug.settings PythonAuthenHandler django.contrib.auth.handlers.modpython pythonOption DJANGO_SETTINGS_MODULE django_smug.settings Options +Indexes SetHandler None Authentication works fine, and I can index the files, but the index doesn't show directories for some strange reason.... which means either I need a flat file structure (which would be very bad, right now I have a directory for each family and sub-directories for each person, with a flat structure you would never be able to find anything) or I need to just let everyone have access, which could be bad too, since there are pictures of living people in there (cousins etc). The only weird thing in the above is the SetHandler None, which is there because I want Apache to index the files, and I haven't written a view to index them. I could write a view, but that is slower, and I am curious what is wrong, they are static files, so I would rather let Apache handle it. When I change the .htaccess file to the following: Options +Indexes SetHandler None It indexes files and directories, but of course has no authentication. No idea why.... when I set it to: AuthName "HohumRealm" AuthType Basic AuthUserFile /home/jlc/Family.passwd require valid-user Options +Indexes SetHandler None Authentication works, and directories index, but the user database is not synced to django's user database. So, this seems to mean that I can't use django authentication, but have to use old school .htaccess authentication to protect directories IF I want directory indexing to function correctly. This isn't a deal killer, but it does mean that I can't use the same user/password list for both, which is a bother to my users (they have to create a user twice, and some of them are computer illiterate, and would get confused). Any ideas how to fix this? If it could be fixed, it would be a MUCH better solution than doing things the old-school way. Apache version is 2.2.9, What other information would be useful? Thanks in advance for your help, James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---