#1908: Having an app name the same as project name breaks manage.py ( unable to
import projectname.settings )
-----------------------------------------+----------------------------------
Reporter: [email protected] | Owner: adrian
Status: reopened | Milestone:
Component: django-admin.py | Version: SVN
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-----------------------------------------+----------------------------------
Changes (by techtonik):
* status: closed => reopened
* resolution: wontfix =>
Comment:
There is one more case not caught by manage.py and it is very hard to
debug. Inside project directory you can't have a package similarly named.
Repeatable on Python 2.5/2.7, Django 1.1.2/1.2.3
{{{
> python django-admin.py startproject fudge
> cd fudge
> python manage.py runserver
Validating models...
0 errors found
Django version 1.1.2 SVN-14851, using settings 'fudge.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
}}}
Now create child fudge/ directory with `__init__.py` inside.
{{{
>mkdir fudge
>echo #>fudge\__init__.py
>python manage.py runserver --traceback -v 2
Error: Could not import settings 'fudge.settings' (Is it on sys.path? Does
it have syntax errors?): No module named settings
}}}
I've wasted some precious hours troubleshooting new Rietveld installation
due to this bug. Note that traceback is not displayed even though it is
requested explicitly.
--
Ticket URL: <http://code.djangoproject.com/ticket/1908#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.