[Fixed]-Getting type error: "takes exactly 1 arguments, given 6" in Django when using a function that does take 6 positional args


You are overriding the name meli_publicar with the function your are decorating.

Don’t use name meli_publicar name twice.

def meli_publicar(titulo,pvp,categoria,tapa,descripcion,access_token):

@receiver(post_save, sender=EjLibro)
def meli_publicar_signal(sender, **kwargs) # use different name
    respuesta = meli_publicar('A title',100,'MLA40490',tapa,'<h1>Título</h1>',access_token)

Leave a comment