The linear-response transport properties of a T-shaped double quantum dot strongly coupled to external ferromagnetic leads are studied theoretically by using the numerical renormalization group method. It is shown that when each dot is occupied by a single electron, for antiparallel alignment of leads' magnetizations, the system exhibits the two-stage Kondo effect. For parallel alignment, however, the second stage of the Kondo effect becomes suppressed due to the presence of ferromagnetic-contact-induced exchange field. The difference between the two magnetic configurations results in highly nontrivial behavior of the tunnel magnetoresistance, which for some parameters can take giant values. In addition, the dependence of the linear conductance and tunnel magnetoresistance on external magnetic field, the double-dot levels' position, and the spin polarization of the leads is thoroughly analyzed. It is shown that the second stage of the Kondo effect can be restored by fine-tuning of the magnetic field or the dots' levels. The effect of spin-dependent tunneling on the low-temperature transition from the high to low conducting state of the system, which occurs when changing the hopping between the dots, is also discussed.