On 7/19/06, Maciej BliziĆski <
[EMAIL PROTECTED]> wrote:
Sorry - nothing like that is in place at the moment. Other replies on this thread have shown two other alternatives; a third alternative is to put:
--
from django.conf import settings
from myapp import myapp_defaults
settings.configure(default_settings=myapp_defaults, DEBUG=True)
--
in your script. The settings.configure call allows you to import a settings file, and easily override the default settings in a single call, without messing with the environment. However, the end effect is the same. More details here: http://www.djangoproject.com/documentation/settings/
That said, your 'run script from manage.py' idea sounds interesting. I would suggest logging it as an enhancement request, and, if you're feeling adventurous, try your hand at a patch (as a hint, django.core.management.py will be your starting point).
Yours,
I already checked the documentation for manage.py, but it doesn't
mention anything about executing a script.
Sorry - nothing like that is in place at the moment. Other replies on this thread have shown two other alternatives; a third alternative is to put:
--
from django.conf import settings
from myapp import myapp_defaults
settings.configure(default_settings=myapp_defaults, DEBUG=True)
--
in your script. The settings.configure call allows you to import a settings file, and easily override the default settings in a single call, without messing with the environment. However, the end effect is the same. More details here: http://www.djangoproject.com/documentation/settings/
That said, your 'run script from manage.py' idea sounds interesting. I would suggest logging it as an enhancement request, and, if you're feeling adventurous, try your hand at a patch (as a hint, django.core.management.py will be your starting point).
Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

