1

Resolved

manage.py collectstatic not done when publishing

description

This used to be done automatically in PTVS 2.0 RTM when publishing. The collected static files were published (even though they are not included in the project).

Download the tutorial project (link is in django tutorial on codeplex)
Create virtual env, install django
Run locally to make sure everything is fine

Publish to Azure Web Site

You'll see that the style sheet isn't loaded -- the text is regular color and there's no background image.

I looked in the project folder, and the obj/release/package/packagetmp folders, and I don't see a static folder containing the collected files.

comments

Zooba wrote Feb 11 at 3:45 PM

The target dependencies weren't updated at one point, so it won't run automatically. The fix is to add this property to Microsoft.PythonTools.Django.targets:
    <PipelineCollectFilesPhaseDependsOn>
      $(PipelineCollectFilesPhaseDependsOn);
      DjangoCollectStaticFiles;
    </PipelineCollectFilesPhaseDependsOn>
(And optionally to remove the BuildDependsOnTargets value).