# Django - can not use manage.py

 0 Hello, I tried to setup a Python service with django - however, when I try to run: dotcloud run coreknowledgeplatform.www python current/manage.py syncdb I get the following error: Traceback (most recent call last): File "current/manage.py", line 11, in execute_manager(settings) File "/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/__init__.py", line 436, in execute_manager setup_environ(settings_mod) File "/home/dotcloud/env/lib/python2.6/site-packages/django/core/management/__init__.py", line 419, in setup_environ project_module = import_module(project_name) File "/home/dotcloud/env/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name)ImportError: No module named rsync-1309387840.32 I don't know why python is trying to import the rsync folder? Hope someone knows how to solve this.   Thanks in advance. asked Jul 08 '11 Gjallar 1 ● 1

 1 You need to add an extra directory; i.e. your manage.py file should not be straight at the root of your app, but inside a subdirectory. You will when be doing stuff like "dotcloud run myapp.www python current/myapp/manage.py syncdb" and that will work! answered Jul 08 '11 jpetazzo 363 ● 2 ● 3 ● 7
 0 I'm actually finding that you should not put your application in a subfolder but you should have all your dotCloud configuration files inside the root of your application. Otherwise when you run the app locally the namespace does not include the application name but when you run it on dotCloud it does. This makes it impossible to develop and then publish your code without touching it. I'm sure this is not the best way to do it but I'm totally new to Python and Django so am just getting things to work the easiest way I can figure out. When I learn a little more Python/Django I'll figure out how to do it the proper way but there seems to be a lot of debate in the Django community itself on how to do development vs. production. This from a language that claims as one of its strengths that there is only one way to do things right. I have also broken the config files up into three sections: one with global settings, one with local development settings, and one with the server settings. I set an environment variable in the postinstall shell script like this: export DJANGO_ENV='prod'  Then in my settings file I test for it like this: # global settings DJANGO_ENV = os.environ.get('DJANGO_ENV', 'dev') if DJANGO_ENV == 'prod': # production settings else: #development settings  This way if my app is loaded via the wsgi script, i.e. it's in dotCloud, it automatically loads the production settings but if I'm running the server on my development machine then it loads my local development settings. You could also just use a development section that overwrites the standard production settings but I like to have the settings specific to production singled out. answered Jan 02 '12 mikbe 1 ● 1
 0 me too.... answered Jun 30 '11 F4TFOJMH 1