This project has moved. For the latest updates, please go here.

Django 1.4

May 21, 2013 at 7:53 PM

I have installed Python 2.7 and Django 1.5.1 and having some problems. Now I see in visual studio the following;

What does this mean? And if this is Django 1.4 where is it coming from? I did not install that.

May 21, 2013 at 8:24 PM
We currently only support Django 1.4 (feature request for 1.5 is here), though in our experience 1.4 and 1.5 are similar enough that it should mostly work.

What sort of problems are you having? It's quite likely that they would exist for 1.4 as well as 1.5.

(The reference you see there is coming from your project file - it doesn't actually reflect anything on disk.)
May 21, 2013 at 9:11 PM
Edited May 21, 2013 at 9:13 PM
When I try to debug I get error message and you can see here it refers to Django 1.5.1:

So not sure what happens. I have installed Django normal pip on the 2.7. But Python Tools in installed with Django 1,4 and I don't know where this is installed.

So a bit confused. Do I need to uninstall Django 1,5,1 and then install 1.4 to match PTVS's version?
May 21, 2013 at 10:05 PM
You should not need to - this is a runtime error and nothing to do with our support.

About the only thing we could be getting wrong here is the search path ("Python Path" as shown in that screenshot). Does your site work when you start it from the command line?
May 23, 2013 at 7:10 PM
I am not so sure. I have tested this a bit more:
  1. I start a new clean project.
  2. I follow the 3 steps to enable admin as described here:
  3. Doing that I get this error:
  4. Trying to go to "http://localhost:1750/admin/" I get this error:
If I try the same with command line only and it works.

Also when you Syncdb first time in command line you are asked if you want to create a superuser. You are asked the same in the syncdb popup in ptools but you can't create. It doesn't respond to yes/no.

So to me it seems this is caused by ptools somehow.

Thanks ,
May 23, 2013 at 10:13 PM
We probably need to run syncdb with the --noinput option from within PTVS, or we'll need to change that dialog so that it is more like a console window which allows input and output. I suspect the fact that it's prompting you means it's blocking and not actually doing it's job. For the time being it sounds like running it from the command line is a work around, but I'll go ahead and copy this to a bug.

Thanks for the feedback!
May 23, 2013 at 10:14 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 24, 2013 at 9:49 PM
Ok, but the syncdb/input wasn't really a problem.... The main problem is that Django in PTVS doesn't work. Can't run the samples as shown above. I simply need to develop outside PTVS because it doesn't work for Django.
May 24, 2013 at 11:01 PM
Can you run python -c import sys; print(sys.path) in the same folder you'd start your site from and post the results? I'm interested to see whether we're getting a search path wrong. (I'll be comparing to the second screenshot you posted, so you can check first if you like.)
May 25, 2013 at 3:19 PM
May 25, 2013 at 3:45 PM
Okay, clearly search paths aren't the problem. We'll have to try and come up with a repro internally to figure out what's going on. If you can send your original project to, that will help things along. Otherwise, we'll get back to you.