Django 1.5....

Dec 2, 2012 at 12:38 AM

Hi,

I looked around for a bit for a direct answer but only found bits and pieces. I was wondering what would people recommend me doing in order to use PTVS with the beta of Django 1.5? Should I be creating the project outside of VS and import it or is there an easier way to specify Django versions when creating a new project from within VS at the new project creation wizard?

 

Thanks!

Coordinator
Dec 3, 2012 at 6:44 PM

This is a little bit rough right now.  What I would suggest creating it outside of VS and importing it, but the new project from existing code feature currently doesn't create Django projects.  So I'd suggest after using that to import the code I'd open the project by hand and make a couple of updates to it.  You should add:

 

<Import Project="$(VSToolsPath)\Python Tools\Microsoft.PythonTools.Django.targets" />

At the end right before the "</Project>" line, and then replace the 1st property group in the .pyproj file with:

  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>$guid1$</ProjectGuid>
    <ProjectHome>.</ProjectHome>
    <ProjectTypeGuids>{5F0BE9CA-D677-4A4D-8806-6076C0FAAD37};{349c5851-65df-11da-9384-00065b846f21};{888888a0-9f3d-457c-b088-3a5042f75d52}</ProjectTypeGuids>
    <StartupFile>manage.py</StartupFile>
    <SearchPath></SearchPath>
    <WorkingDirectory>.</WorkingDirectory>
    <LaunchProvider>Django launcher</LaunchProvider>
    <OutputPath>.</OutputPath>
  </PropertyGroup>

That'll give you all of the normal Django project features.  I'll also open a work item for us to support creating projects with different Django versions.

 

 

Coordinator
Dec 3, 2012 at 6:44 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Dec 4, 2012 at 5:37 AM

Thanks! I will see if I can get it to work. Again thanks for your time and your efforts!