DB Syncing Models

2006-12-03 Thread marksibly
Hi, What's the 'right' way to update the database when you change a model? For example, when you add a new field? I initially thought 'manage.py syncdb' would detect and handle this for you, but it doesn't appear to. Currently, I'm using MySql to 'DROP TABLE' and then using 'manage.py syncdb' a

File downloads

2006-12-03 Thread marksibly
Hi, I have a django 'files' app that simply maps 'virtual' file names to physical files for downloading. Currently, I'm getting the view to return a HttpResponseRedirect to a 'files' area, but I don't like this as it means the files are 'publicly' available and I'd like everything to go through

Re: File downloads

2006-12-03 Thread marksibly
Hi, Thanks for that! Another option I've found is to use mod_python's 'sendfile()' method in req. However, I'm having a problem using Django within a 'plain' mod_python handler - I get the 'DJANGO_SETTINGS_MODULE' not found error as soon as I try to import my models. I've copied the apache co

Re: File downloads

2006-12-03 Thread marksibly
Found it in the FAQ; [quote] If you're using mod_python but not using Django's request handler, you'll need to work around a mod_python bug related to the use of SetEnv; before you import anything from Django you'll need to do the following: os.environ.update(req.subprocess_env) [/quote] --~--~