1👍
You can make your answer for example json encoded, where you will return two parameters:
{
success: true/false,
data : YOUR_DATA_HERE
}
So success callback can look into success part, and decide whether to show popup with data, or make page reload
Sorry, I don’t know python, so can’t advise exact expression to make correct json encode.
Source:stackexchange.com