ubuntu-accomplishments-contributors team mailing list archive
-
ubuntu-accomplishments-contributors team
-
Mailing list archive
-
Message #00097
dash in django project or app name
Hi,
To my knowledge django doesn't allow the dash character in it's project
or app names. If you try do
'$ django-admin.py startproject ubuntu-accomplishments-web-editor'
you will generate an error. I am not sure how the project was initially
created.
The reason I bring this up is as I'm trying to move the project over to
Django 1.4 and there is a big change documented here:
https://docs.djangoproject.com/en/dev/releases/1.4-alpha-1/#updated-
default-project-layout-and-manage-py
This changes the structure of the project slightly and more importantly
changes the manage.py call.
The problem?
Inplaces where settings has been imported. For example
editor/utilites.py has this import:
from django.conf import settings
according to the new project structure adhering to django 1.4 this now
needs to change to
from django.conf import ubuntu-accomplishments-web-editor.settings
but because of the dash characters you will see this error "SyntaxError:
invalid syntax"
Solution
Have the project renamed and replace the dash characters with
underscores instead.
This issue has appeared to me trying to upgrade to django 1.4 but I
believe that even if we left this in django 1.3 that someone will run
into this issue sooner or later.
--
This message was sent from Launchpad by
Darren (https://launchpad.net/~darrenma1986)
to each member of the Ubuntu Accomplishments Contributors team using the
"Contact this team" link on the Ubuntu Accomplishments Contributors team page
(https://launchpad.net/~ubuntu-accomplishments-contributors).
For more information see
https://help.launchpad.net/YourAccount/ContactingPeople
Follow ups