[wingide-users] autocompletion
Tim Kersten
tim at io41.com
Sat Jan 30 07:34:54 MST 2010
For django projects, I usually just click "Project" -> "Properties" and
insert the path to the directory containing my django project.
If my django project was called "my_website" and this was in a "projects"
directory, I'd add the "projects" directory.
Under *nix: /home/tim/projects/
Under windows: c:\somewhere\projects\
That does the trick for me. :)
Tim ^,^
On Fri, Jan 29, 2010 at 5:08 PM, Wingware Support <support at wingware.com>wrote:
> Michael P. Soulier wrote:
>
>> On 29/01/10 Wingware Support did say:
>>
>> I don't know that much about Django internals. How does it end up
>>> finding them? If there is a main entry point that sets sys.path then you
>>> can set this as the main debug file in Wing IDE and it may automatically
>>> detect the path. If not, you need to manually add them.
>>>
>>> I somewhat suspect that Django is designed so you simply add the models
>>> directory to the path and then do "import MyAppName" instead. If the models
>>> directory has an __init__.py file in it, then this is the case.
>>>
>>
>> Yes, each application subdirectory is a python module namespace, but they
>> are
>> defined in the main settings.py file.
>> For example, from my settings.py:
>>
>> INSTALLED_APPS = (
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.admin',
>> 'servermanager.lib',
>> 'teleworker.advanced',
>> 'teleworker.dashboard',
>> 'teleworker.icps',
>> 'teleworker.clients',
>> 'teleworker.metrics',
>> 'teleworker.proxies',
>> 'teleworker.lib',
>> 'teleworker.js',
>> 'teleworker.scrc',
>> 'teleworker.cluster',
>> )
>>
>> teleworker is the name of my current project directory, which also has an
>> __init__.py in it. One always adds this directory to the PYTHONPATH of the
>> hosting web server in one way or another. Through the settings.py file it
>> then
>> discovers the rest of the application.
>>
>
> So you will probably need to add them manually in Wing IDE, in project
> properties. To make this easier, set a breakpoint somewhere where the path
> would already have been set up in Django, and use the Debug Probe tool to
> print the Python path and then copy and paste it into your project
> properties. You will need to switch the past display to text mode before you
> can paste.
>
> Note that you can also use environment variables in the Python path in
> project properties, which may make managing this easier.
>
> It would be good to hear from other Django users if there is some better
> way of doing this, and to update the how-to to include more information
> about this.
>
>
> --
>
> Stephan Deibel
> Wingware | Python IDE
> Advancing Software Development
>
> www.wingware.com
>
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20100130/1b83e2a0/attachment.html
More information about the wingide-users
mailing list