[Django]-Import error from "Django Tutorial: a Todo List App"


For starters, you should follow the official tutorial: https://docs.djangoproject.com/en/dev/intro/tutorial01/

The tutorial you’re following looks pretty awful (sorry :/)

I suspect that dbe is the project name of this guy. When he shows:

cp -r django/contrib/admin/templates/admin/ dbe/templates/

It seems that he has django and the project at the same level. So his dbe == your mysite.

Anyhow, there is no need to prefix app modules with the project module name, this is ridiculous – hard coding the project name in the apps. This totally defeats the purpose of reusable apps. Run this:

find /path/to/your/project -type f | xargs sed -i -e s/dbe.//g

This command will remove ‘dbe.’ from everywhere in your code. This tutorial code is so horrible I wonder why you even bother following it …


Leave a comment