1

I'm trying to get django running on my dreahost account. I've been trying to sort of use two tutorials at once: the one on the dreamhost wiki and the one in the django book.

I installed django using the script on the wiki page, but I ran into trouble immediately while trying to work through the django book. It says:

To start the server, change into your project directory (cd mysite), if you haven’t already, and run this command:

python manage.py runserver

This launches the server locally, on port 8000, accessible only to connections from your own computer. Now that it’s running, visit 127.0.0.1:8000 with your Web browser. You’ll see a “Welcome to Django” page shaded in a pleasant pastel blue. It worked!

Those instructions seem to assume that you're developing locally, not on a shared server. Where the heck am I supposed to look for the "Welcome to Django" page after starting the server? In my webroot? No dice.

Anyway, I tried to blunder ahead through the django book to its hello world tutorial (chapter 3). But once I've edited the view file and the URLconf, I don't get a nice clean "hello world" text. Instead (as you can see) I get an "import error".

Any help would be greatly appreciated.

Community
  • 1
  • 1

3 Answers3

2

Don't try and learn Django via your server. Install it on your local computer, learn how it works, develop your project, and then install it on Dreamhost.

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895
1

Your project assumes that 1) your app is called "mysite", and 2) mysite is a package, e.g. mysite/__init__.py exists. If either of those are false then correct your code and/or file structure.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
0

This is an old post and am sure you have found the answer by now. I have solved this problem by using the command

python manage.py runserver mydomain.com:8080
kmcodes
  • 807
  • 1
  • 8
  • 20