Generalized Dijkgraaf-Witten invariants in low-dimensional topology