Frame locks, frame locks, frame locks! Fell in love with the idea of not having a D lock on the bike. But in answer to your question several pannier rack makers effectively have a model with a way of carrying a D lock. I have also seen a short one being carried above the bottle battery under the top bar. And on a step through frame often just plonked in the large front basket with all the rest.
cant fit my d lock like that, my rack doesnt have a long space like that,sometimes i`ve used velcro straps to attach it the back rack,but usually i just put it in my bike bag now....
I have found this solution to fitting my Abuse Granit X lock to both my new Kalkhoff and my previous Wisper 905 bike.... Note however that this requires purchasing the lock with the Easy KF bracket...