def run(public=True, port=None):
    settings.configure(
        ROOT_URLCONF='runserver',
        DEBUG=True,
        TEMPLATE_DEBUG=True,
        TEMPLATE_DIRS=[TEMPLATE_DIR],
        APPEND_SLASH=False,
        STATIC_ROOT=STATIC_DIR,
        MEDIA_ROOT=MEDIA_DIR,
        STATIC_URL='/static/',
        MEDIA_URL='/media/',
    )
    port = port or get_open_port() 
    if public:
        location = port % '0.0.0.0:%s'
    else:
        location = '127.0.0.1:%s' % port
    call_command('runserver', location)
dataset/ETHPy150Open ojii/django-template-server/templateserver/runserver_template.py/run/swapped operands of `%`