Other than something like this, obviously, which works, but is a bit
fragile & certainly not very nice:

        def get_server_address_by_stack_inspection():
            import inspect
            for s in inspect.stack():
                if (s[0].f_code.co_filename.endswith("django/core/
servers/basehttp.py")
                    and s[0].f_code.co_name == "run" and s
[0].f_code.co_argcount == 3):
                    return s[0].f_locals['server_address']


On Oct 26, 11:34 pm, tow <toby.o.h.wh...@googlemail.com> wrote:
> If you're running your django server through ./manage.py runserver, is
> there a way, from within the django process, to discover which  IP
> address and port are in use?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to