python - how using django-filebrowser at apache? -
hi all: have quirky question django-filebrowser,
my project @ /home/q/django/myapp, save django-filebrowser @ /home/q/django/myapp/filebrowser .
**myapp.settings.py** installed_apps=( ..... myapp.filebrowser, .... ) **myapp.urls.py** urlpatterns=patterns('', (r'filebrowser/',(include("filebrowser.usls")), .... )
everything tutorials http://code.google.com/p/django-filebrowser/wiki/installationbasic .
but it's not work.when saved django-filebrowser django's directory:/usr/local/lib/python2.6/.... it's work fine.
so,if want modify settings,i need change filebrowser.settings.py @ django root directory(/usr/local/lib/...),not project directory(/home/q/django/myapp/filebrowser)
i think not advisable.someone me advice? &_& thks
my os:ubuntu 10.04 django version :1.24 grappelli:3.x python version:2.6(own system) web server:apache+mod_python
you can modify settings, including of django-filebrowser, in myapp.settings
. settings.py
in filebrowser
default values used if don't specify them in own settings. used pattern 3rd party django apps define default values settings.
if @ filebrowser.settings
, you'll see line @ top:
from django.conf import settings
that line imports django's settings module, contains django's default settings, overridden settings defined in myapp.settings
.
further down in filebrowser.settings
, there lines like
directory = getattr(settings, "filebrowser_directory", 'uploads/')
this assigns value myapp.settings.filebrowser_directory
directory
, or, if haven't defined setting, default value 'uploads/'
.
btw: avoid mod_python plague. it's unsupported, unmaintained , pain. there's better alternative: mod_wsgi
Comments
Post a Comment