0

I want to get Django Site URL's inside another function.

I know and i am using, django_extensions

Currently am fetching using, ./manage.py show_urls

but i want fetch URLs into variable.

is there a way to use django-extensions inside a custom function?

Try 1:

from django.core.management import call_command

this also not helpful. seems work only with Preinstalled Modules

Mohideen bin Mohammed
  • 18,813
  • 10
  • 112
  • 118
  • 1
    Can you elaborate more on that question? Maybe provide some code example and desired behavior? – GwynBleidD Sep 05 '19 at 12:06
  • Possible duplicate of [How can I call a custom Django manage.py command directly from a test driver?](https://stackoverflow.com/questions/907506/how-can-i-call-a-custom-django-manage-py-command-directly-from-a-test-driver) – Brown Bear Sep 05 '19 at 12:17
  • 2
    What are you trying to do exactly ? I suspect a [XY problem](https://en.wikipedia.org/wiki/XY_problem)... – bruno desthuilliers Sep 05 '19 at 13:39

0 Answers0