How are you starting the dev server? I'm mostly familiar with *nix usage, but, in a nutshell, the only thing that python code needs to use the virtual environment is to be run with the correct python. On *nix, pretty much the only significant thing that activate is to tweak the environment's path such that typing "python" starts the one from the virtual environment's bin directory, rather than the system python, which python has the virtual environment's lib/python2.x/site-packages first on it's sys.path. You don't actually have to activate the VE so long as you use that python to run manage.py.
Probably what you need is a script, say, manage.bat, which cd's to the directory containing manage.py, then invokes it using an explicit path to the correct python.exe, plus whatever you have to do in batch files to pass the arguments that you give to manage.bat on along to: \path\to\virtual\environment\bin\python.exe manage.py %something_that_gets_args% Then, with this on you path, you can just say "manage runserver". But, as I say, I don't really do Windows, and I'm assuming that .bat files work like they used to, so you may have extra research to do. Bill On Thu, Jul 14, 2011 at 3:54 AM, Mike Dewhirst <mi...@dewhirst.com.au> wrote: > Trying to get virtualenv working for the first time for a new project and > have stumbled somehow. I can get it working as advertised (see below) but > django dev server doesn't notice. > > Any hints appreciated ... > > ||| here is virtualenv being activated > > C:\users\miked\py\ssds>Scripts\activate > (ssds) C:\users\miked\py\ssds>python > Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> import django >>>> django.get_version() > '1.3' >>>> quit() > > ||| correctly showing django version 1.3 installed in virtualenv ssds > ||| so now I want to start the dev server > > (ssds) C:\users\miked\py\ssds>Scripts\django-admin.py runserver > --settings=src.settings > Validating models... > > 0 errors found > Django version 1.4 pre-alpha SVN-16452, using settings 'src.settings' > Development server is running at http://127.0.0.1:8000/ > Quit the server with CTRL-BREAK. > > ||| it has used my global site-packages django 1.4 from trunk > ||| just in case, here is my ssds\Scripts\django-admin.py > > #!C:\users\miked\py\ssds\Scripts\python.exe > from django.core import management > > if __name__ == "__main__": > management.execute_from_command_line() > > > Thanks > > Mike > > -- > 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. > > -- 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.