Captive portal using python server

im trying to make python script for captive portal access point.
On android devices when we connect AP, in few seconds we have pop-up window to open captive portal website.

Im using hostapd, dnsmasq, and python web server. Below configs & python server

hostapd.conf:

driver=nl80211
interface=wlan1
ssid=TestAP
channel=1

dnsmasq.conf:

interface=wlan1
dhcp-range=10.0.0.10,10.0.0.100,8h
dhcp-option=3,10.0.0.1
dhcp-option=6,10.0.0.1
address=/#/10.0.0.1

iptables:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables –flush
iptables –table nat –flush
iptables –delete-chain
iptables –table nat –delete-chain
iptables -P FORWARD ACCEPT

interface configuration:

ifconfig wlan1 10.0.0.1 netmask 255.255.255.0

python server is starting on custom ip and port like 10.0.0.1, port 80

I can manually open webiste on connected phone, but i want a pop-up window on my device