def skip_if_offline(func):
 @functools.wraps(func)
 def decorator(*args, **kwargs):
  if context.is_offline_mode():
   return
  return func(*args, **kwargs)
 return decorator

def skip_if_offline ( func ) : @ functools . wraps ( func ) def decorator ( * args , ** kwargs ) : if context . is_offline_mode ( ) : return return func ( * args , ** kwargs ) return decorator
decorator for skipping migrations in offline mode .