On Mon, 22 Aug 2016, Michal Petrucha wrote:

Just to add to what Tim wrote, there's no reason why you couldn't use the
crm package created by startproject as an “app”, too – all you have to do
is create a models.py file in there (next to the existing urls.py, if you
need any models), views.py (if you need views), and add 'crm' to
``INSTALLED_APPS``. That's pretty much the same thing as what startapp
would have done, anyway.

Michal,

  Thanks for the insight.

  Seems to me that models and views are essential to a django application.
Regardless, I saw why startapp failed: I overlooked the requirement to
create a postgres database from the commandline prior to asking django to
use it.

  INSTALLED_APPS now has 'crm' at the end of the django.contrib.* list.

  One clarification on projects vs applications will help my learning.
Rather than using the same name for both (based on prior advice), the
project name is clientmanagment and that directory contains
        clientmanagement/  crm/  manage.py*

  The clientmanagement/ subdirectory contains
        __init__.py   __pycache__/  settings.pyc  wsgi.py
        __init__.pyc  settings.py   urls.py

and I wonder why the project-related files in this subdirectory are not
under the parent project directory. In other words, why is there a project
subdirectory under the project directory?

Thanks,

Rich

Reply via email to