WebFaction
Community site: login faq

I am having a lot of issues creating my database after uploading my existing project into a new webfaction account (the project was created by a 3rd party).

When I attempt to run python2.7 manage.py syncdb, I am getting the error message below.

How do I run the django_admin.py "passing it my settings module"? I have gone to my settings module and uncommented the line "'django.contrib.admin',", but the error message persists!

Please dumb down the answers as I am a newbie that is struggling to understand the webfaction environment.

ERROR MESSAGE:

    [my_new_project@webXXX projectx]$ python2.7 manage.py syncdb
Warning: Can't find the file 'local__settings.py' in the directory containing '/home/<username>/webapps/django_app/projectx/projectx/settings.pyc'. It appears you've customized things.
You'll have to run django-admin.py, passing it your settings module.
(If the file settings.py does indeed exist, it's causing an ImportError somehow.)

For debugging purposes, the exception was:

Traceback (most recent call last):
  File "/home/<username>/webapps/django_app/projectx/projectx/settings.py", line 8, in <module>
    from local_settings import *
ImportError: No module named local_settings
ImportError: No module named registration
[my_new_project@webXXX projectx]$

asked 07 Aug '13, 20:44

6233114
15210
accept rate: 0%

edited 07 Aug '13, 21:57

Thanks, I have amended the project's location as you have suggested, but the error still occurred.

So I am trying to amend my python path in the file httpd.conf. The line below is what I have, and the error still persists.

Any suggestions?

WSGIDaemonProcess django_app processes=2 threads=12 python-path=/home/<username>/webapps/django_app:/home/<username>/webapps/django_app/projectx:/home/<username>/webapps/django_app/lib/python2.7
(08 Aug '13, 20:14) 6233114

Have you restarted your Apache instance after making the change? Just confirming, as this is required and an easy step to miss.

(08 Aug '13, 21:04) waynek

yes I have restarted the apache server. I am still stuck!

(10 Aug '13, 20:53) 6233114

Running python2.7 manage.py syncdb doesn't make use of the python-path you've set in your Apache configuration, since this is a command you're running from the shell (not through WSGI).

You also will need to ensure that all of the required modules are on your PYTHONPATH as well. For instance:

export PYTHONPATH=/home/<username>/webapps/django_app:/home/<username>/webapps/django_app/projectx:/home/<username>/webapps/django_app/lib/python2.7
python2.7 manage.py syncdb

Hope that helps!

(10 Aug '13, 21:27) ryans ♦♦

This is because the local_settings and registration modules can't be found on the Python Path. Looking at your project's location I would guess that if you moved the /home/<username>/webapps/django_app/projectx/projectx/ directory one level up (if there is nothing else in the first projectx directory) then it might just work, otherwise you will need to update your project's Python Path to explicitly point to the location of those modules. You can find instructions for doing that here.

permanent link

answered 08 Aug '13, 03:48

waynek
4254
accept rate: 27%

Thanks, I have amended the project's location as you have suggested, but the error still occurred.

So I am trying to amend my python path in the file httpd.conf. The line below is what I have, and the error still persists.

Any suggestions?

WSGIDaemonProcess django_app processes=2 threads=12 python-path=/home/<username>/webapps/django_app:/home/<username>/webapps/django_app/projectx:/home/<username>/webapps/django_app/lib/python2.7

(08 Aug '13, 21:31) 6233114
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×84
×30

question asked: 07 Aug '13, 20:44

question was seen: 3,142 times

last updated: 10 Aug '13, 21:27

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM