How I am supposed to use django support with buildout?
Os: Linux (Ubuntu 10.10)
Buildout directory: /buildout/
Django project directory: /project/
I use djangorecipe (which generates /buildout/bin/django script). When I'm trying to create a "Django Server" run configuration, it always says, that "django is not importable in this envirionment". I have only 2.6 and 3.1 (system-wide) interpreters, and my virtualenv interpreters. Nothing related to buildout (if there should be one).
So - how I should use django with bouildout?
Please sign in to leave a comment.
Hello,
Please make sure that Settings | Buildout Support is enabled and the correct
buildout script is selected.
Note that by default we assume that the buildout directory is the same as
the project directory; in that case the configuration should be autodetected.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I have same issue with similiar project structure:
buildout/
bin/
project/ # django project
...
PyCharm reports that "django is not importable in this envirionment".
Interesting thing is that, if you press 'No' as an answer to "Configuration is still wrong. Do you want to edit it again?" dialog, then project is properly started.
Hello Maciej,
Have you enabled Builout support in the settings dialog?
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Yes, I have both Buildout support and Django support enabled.
I have message that says Django is not importable but I can start application by clicking 'No' in confirmation dialog (as stated in previous post)
At Buildout support I have:
V - Enable buildout support (enabled)
Use paths from script: /.../somesitename/bin/django
At Django support page I have:
V - Enable Django support (enabled)
Project root - /.../somesitename/project # but by default it was: /.../somesitename/ only (in fact it doesn't change anything, application runs with both paths)
Settings: development.py
Manange script: manage.py
At /.../somesitename/bin/django script I do have path to django:
'/../somesitename/parts/django',
My project structure is (only interesting files are listed):
somesitename/
bin/
buildout
django
django.wsgi
project/
settings.py
development.py
production.py
...
develop-eggs/
downloads/
eggs/
parts/
buildout.cfg
devel.cfg
production.cfg
bootstrap.py
....
If you want to check this strange behaviour it's pretty simple with buildout project I did some time ago for SCT.
Check: http://sct.sphene.net/board/thread/3657/sct-example-project-in-one-minute-with/?page=1#post-3657
to install this application and then 'Open directory' in Pycharm. Effect is same as decribed before (django is not importable but I still can run my project)
Confirmed, when I click "No" project starts properly. Looks like bug to me.