How do you create your project, using: django-admin.py startproject
XXX? If you did like this, the settings.py should include default
apps.
>
> The tutorial says the following will be found by default in this section.
>
> * django.contrib.auth -- An authentication system.
> * django.contrib.contenttypes -- A framework for content types.
> * django.contrib.sessions -- A session framework.
> * django.contrib.sites -- A framework for managing multiple sites
> with one Django installation.
>
> Can I add these manually before doing a "syncdb"?
Yes. And you can also modify the settings.py as you change the
project, and rerun the syncdb command.
> Do I have to make any changes anywhere to get the samething working ?
Maybe you don't need.
> If I can edit the settings.py manually adding these 4 default things as said, how do the
> settings.py need to be, ie what is the format to add these entries into the
> INSTALLED_APPS section ?
Of course you can add them manually. And there are string fromat, just
like python module. But you should write them just like these:
'yourprojectname.appname1',
'yourprojectname.appname2',
And you can also write them other formats, as long as django can
import them. For example:
'yourprojectname.apps.appname1'
or
'apps.appname1' # and you should add apps' parent directory to
PYTHONPATH, so as django can import them correctly.
>
--
I like python!
My Blog: http://www.donews.net/limodou
My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.google.com/group/NewEdit
>
> How do you create your project, using: django-admin.py startproject
> XXX? If you did like this, the settings.py should include default
> apps.
>
Ya, I did create using 'django-admin.py startproject XXX' but I din't
get the default apps included in the settings.py. Thats the basic
reason behind posting the original message to this group.
> > * django.contrib.auth -- An authentication system.
> > * django.contrib.contenttypes -- A framework for content types.
> > * django.contrib.sessions -- A session framework.
> > * django.contrib.sites -- A framework for managing multiple sites
> Of course you can add them manually. And there are string fromat, just
> like python module. But you should write them just like these:
>
> 'yourprojectname.appname1',
> 'yourprojectname.appname2',
>
As now I don't have the default apps, so can I inlude them in my
settings.py as below :
INSTALLED_APPS (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites'
)
Also, as i don't get the defualts inluded automatically, how will I set
it right? How does django decide which apps to include by default and
will I be able to check whether this setting is right or not ?
Just think: import django.contrib.auth, etc.
> How does django decide which apps to include by default and
> will I be able to check whether this setting is right or not ?
>
>
These things are implemented in django/core/management.py, and the
template files is in django/conf/project_template/settings.py. And you
should see the default settings.py template. My version is 0.95, and
the settings.py file includes the default apps.
Please check your installation, maybe you should remove the django and
reinstall.