We studied niobium nitride (NbN)-based π-junctions with a diluted ferromagnetic Pd89Ni11 interlayer (NbN/PdNi/NbN junctions). In the NbN/PdNi/NbN junctions with various PdNi thicknesses, we observed a non-monotonic dependence of the critical currents on PdNi thickness, indicating the effects of the exchange interaction on the superconducting order parameter. From theoretical fitting of the experimental data, we found that the NbN/PdNi/NbN junctions showed a significantly smaller degree of spin-flip scattering in the PdNi interlayer than in the CuNi interlayer of NbN/CuNi/NbN junctions reported previously. The weak spin-flip scattering leads to a longer decay length of the Josephson critical current, so the critical currents were observed over a wide range of PdNi thicknesses (10 – 40 nm). We also fabricated superconducting quantum interference devices (SQUIDs) including the NbN/PdNi/NbN junction, using a PdNi thickness in which the π-state was expected. A half-flux-quantum shift, as evidence of the π-state, was observed in the magnetic field-dependent critical currents of the SQUIDs. This result represents an important step towards the practical application of NbN-based π-Josephson junctions.