The film was shot in Nice, in Vichy (France), and due to the war, Carné faced a number of difficulties in making the film. Due to the increased censorship during the war, Carné wanted to make a historical and fantastical film that would have little difficulty with the censors.
The film premiered at Paris’s Madeleine Cinema on Dec 4, 1942 and was one of the biggest film events during the war. It was called "the grandest film of the Occupation." One of the reasons that the film was such a huge success was due to murmuring before the film was released that the film was an allegory for the current situation. Many people saw the character of the Devil as representing Hitler and the continued beating hearts of the lovers as representing France living under German rule, but not giving up hope. Carné maintained until his death that the film was not an intentional allegory for the war and that any relationship was purely unconscious.
Source : Wikipedia.