List Info

Thread: Installed Apps in settings.py




Installed Apps in settings.py
user name
2006-07-31 04:58:36
Hi,

Am trying out my first hands with Django and was following the tutorial given in the documentation. I have created a project and in the settings.py file, as it is said in the tutorial, there is no default installed apps. It is like...

INSTALLED_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"? Do I have to make any
changes anywhere to get the samething working ? 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 ?

Thanks in advance
-- 
With Regards

Parthan ('technofreak')
------------------------------
Research Assistant NRC-FOSS and Python\PHP Developer
A Proud Tuxian and an Ubuntero
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users"; group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to django-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Installed Apps in settings.py
user name
2006-07-31 05:30:58
On 7/31/06, Parthan SR <perl.technofreakgmail.com> wrote:
> Hi,
>
> Am trying out my first hands with Django and was
following the tutorial
> given in the documentation. I have created a project
and in the settings.py
> file, as it is said in the tutorial, there is no
default installed apps. It
> is like...
>
> INSTALLED_APPS = (
> )

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/l
imodou
My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.
google.com/group/NewEdit

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Installed Apps in settings.py
user name
2006-07-31 08:59:13

limodou wrote:

>
> 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
?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Installed Apps in settings.py
user name
2006-07-31 09:12:54
On 7/31/06, Technofreak <perl.technofreakgmail.com> wrote:
>
>
> limodou wrote:
>
> >
> > 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?

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.

-- 
I like python!
My Blog: http://www.donews.net/l
imodou
My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.
google.com/group/NewEdit

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )