I think this asks for a two locks system.
One locks the back wheel to the frame, a ring shaped lock will do that but any shape lock will work.
The other lock should be a longer chain or cable, with which you lock the front wheel to the frame and both to the stand or your wheel to the stand and then frame. Or an other fixed point if it is available instead of the stand.
When the stand gets full it gets hard to get near the front wheel, so think about how you place your lock, so you can undo it even when there are other bikes in the way.
There are also ring locks which come with a cable, they look like they will work for this but most are just not long enough. You will need to look for a cable lock or a sturdy cable to be used with a separate lock, meant to be used on bicycles. Or a long chain, which is meant to be used for locking up bicycles or other objects, with a lock or with a separate lock.
I use a cable lock which has the lock build in, my best friend uses a cable with loops on both ends. With that cable, she can feed one end through the loop on the other end, and then she can use her D-lock on the frame, one wheel and the loop of the cable.
Having two different locks make a thief look for an other bike with only one lock, especially when the other bikes look to be as good or better than yours. It has saved me a bike several times, as most bike thieves are specialized in one kind of lock only, or only carry the tools for one type of lock only. A cheap extra lock was left on the bike while the more expensive 'main' lock was broken.