Thanks. Works great!
On Monday, June 6, 2022 at 9:44:39 PM UTC-5 [email protected] wrote:
> You can add the following lines in your script:
>
> `
> import django
> sys.path.append('<your_django_directory>')
> os.environ.setdefault('DJANGO_SETTINGS_MODULE', '<your_django_settings>')
> django.setup()
> `
>
> On Tue, 7 Jun 2022 at 04:17, Jason <[email protected]> wrote:
>
>> Why? what's the purpose behind this?
>>
>> On Monday, June 6, 2022 at 12:27:58 PM UTC-4 [email protected] wrote:
>>
>>> How replace "./manage.py < some_code.py" with "./some_code.py" for
>>> website scripts?
>>>
>>> There seem to be a number of imports needed to make the 2nd version work.
>>>
>>> cs
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/72eaa595-0d6c-44d3-a612-4776b0624c6dn%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/django-users/72eaa595-0d6c-44d3-a612-4776b0624c6dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/6c7fca4e-c708-4122-86e7-bc9e7ff3cbc0n%40googlegroups.com.