Thank you - all four of you were on the money. Taking your advice this is what I did to fix it ...

C:\users\miked\py\ssds <-- root
C:\users\miked\py\ssds\Lib <-- virtualenv python installation
C:\users\miked\py\ssds\Scripts <-- virtualenv python scripts
C:\users\miked\py\ssds\src <-- project source root - contains settings.py

Created a shortcut called runserver with the following command line ...

C:\users\miked\py\ssds\Scripts\python.exe C:\users\miked\py\src\manage.py runserver --settings=.src.settings

... and Start in = C:\users\miked\py\ssds\src

Without needing to activate, this loads the correct python and the correct django. I haven't actually written any code or organised directories yet so it errors and exits but I can see which django is barfing and I'm happy.

Thanks again

Mike


On 14/07/2011 5:54pm, Mike Dewhirst 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.

Reply via email to