Error: 'django-library' is not a valid app name. Please use only numbers, letters and underscores.
You need to differentiate between the name of the *project* and the
name of the *module*.
Taking django-regsitration as an example -- the *project* is named
'django-registration'. When you install that project into your
PYTHONPATH, it is installed as the *module* named 'registration'.
A hyphen isn't legal when used in a package name -- hence the
restriction in startapp. startapp creates a module that needs to be
imported, so it needs to restrict to legal Python module names.
However, when you distribute your app as a packaged Python module, you
can wrap it in whatever package name you want -- and in this context,
hyphens are legal.
The "django-" prefix is fairly common, allowing you to differentiate
'django-registration' from other web framework registration modules.
However, it isn't a mandated standard or anything like that.
> In fact, if you look at Django Pluggables (did they get renamed to Django
> Packages?),
Django Packages and Django Pluggables are different projects. I'm not
sure what happened to Django Pluggables.
Yours,
Russ Magee %-)
The only recommendation I would make is that the name you choose is
essentially the interface to your api, so make it easy to use.
django_foobar is accurate, but a PITA if you have to type it every
time you import/use the app, especially if foobar isn't likely to be
inaccurate in the circumstances.
Yours,
Russ Magee %-)