Runserver with a custom script

19 views
Skip to first unread message

Soumen Khatua

unread,
Feb 18, 2020, 2:17:38 AM2/18/20
to django...@googlegroups.com
Hi Folks,

I want to run a script or url  at the time of django server loading.So Does this possible,If yes could you tell me,How?

Thank you in advance

Regards,
Soumen

Budi Hermansyah

unread,
Feb 18, 2020, 2:29:44 AM2/18/20
to django...@googlegroups.com

--
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 django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WYBbCym1SLKTTvEDBz9uYAj1SbcdF%3Dryia%2BdDwpj24%2B-g%40mail.gmail.com.

Mike Dewhirst

unread,
Feb 18, 2020, 3:33:28 AM2/18/20
to django...@googlegroups.com
On 18/02/2020 6:16 pm, Soumen Khatua wrote:
> Hi Folks,
>
> I want to run a script or url  at the time of django server loading.So
> Does this possible,If yes could you tell me,How?

If the code in your script returns immediately (ie is non-blocking) then
add something like this to the end of it  ...

python3 /path/to/manage.py runserver --settings=<myproj>.settings


>
> Thank you in advance
>
> Regards,
> Soumen
> --
> 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 django-users...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> <https://groups.google.com/d/msgid/django-users/CAPUw6WYBbCym1SLKTTvEDBz9uYAj1SbcdF%3Dryia%2BdDwpj24%2B-g%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages