Cool, looks good

Your proof can perhaps be made more "elegant" with some rearrangement of the presentation, maybe like the following:


Let A = (p-1)^q mod p and B = q^(p-1) mod p.
The sum is divisible by p if and only if A+B = 0 (mod p).
In general, A = (-1)^q, which is never zero mod p.

If q = p, B = 0^(p-1) = 0, so A+B = 0 if and only if A = 0, but this never happens. So, not divisible in this case.
If q != p, from FLT, B = 1.
...If q=2, A=1, so A+B = 2. Since q=2 != p, this is non-zero, so not divisible in this case.
...If q!=2, A=-1, so A+B = 0. So, divisible in this case.

In all, divisible if and only if 2 != q, q != p.