The way Gauss did things was in terms of SL(2,Z) equivalence classes of (primitive) binary quadratic forms over Z. So lets consider such definite forms, axx+bxy+cyy with b^2-4ac=-N. For simplicity suppose N is squarefree and odd. Gauss defines a composition on the classes, making the set of classes into a finite group. For each prime dividing N he defines a genus character from this group to Z/2. The product of these characters is the trivial map, and the joint kernel of them all consists of the squares, a subgroup that he calls the principal genus. In the case N=pq, the character attached to p maps a form to (M/p) where M is any integer prime to p represented by the form. So the squares form, in your case, a subgroup of index 2, and there is a unique non-trivial class of order 2 in the group. Gauss calls the classes of order 2 the "ambiguous classes". They're easily written down in general and are represented by "reduced" forms axx+bxy+cyy with b=0 or with a=b (or c). So in your case the non-trivial ambiguous class is represented by pxx+qyy. The genus character attached to p maps this class to (q/p). So the class is a square if and only if (q/p)=1, giving the result you want. The theory also works for even N not necessarily square-free, though there are 2 genus characters attached to the prime 2 when 32 divides N, and it works for indefinite forms as well.
Oops--I should have said that the non-trivial ambiguous class is represented by qxx+qxy+(1/4)(p+q)yy.