Wednesday, October 5, 2011

Re: setting site-name variable

Which "site-name" variable are you referring to? Usually you'll want to
place global settings in your settings.py file. Then you can access them
elsewhere like this:

from django.conf import settings
print settings.[name of setting]

Also, you might be interested in the sites framework [1], which is useful
for running multiple websites using the same Django project.

1. https://docs.djangoproject.com/en/dev/ref/contrib/sites/

Brett


On 10/5/11 12:14 AM, "ANU" <anuja.gk@gmail.com> wrote:

>1. Can one set "site-name" variable in __init__.py file? How?
>2. Is there any method to set globally "site-name" variable so that in
>the app, no further setting for this variable is needed?
>
>--
>You received this message because you are subscribed to the Google Groups
>"Django users" group.
>To post to this group, send email to django-users@googlegroups.com.
>To unsubscribe from this group, send email to
>django-users+unsubscribe@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment