title: How to enforce reads from read replica in Postgres using django and or flask?
body: <p>Is enforcement of a reads from a read replica an application layer task? </p>
  
  <p>i.e. I have a Postgres database and I have set up a read replica. </p>
  
  <p>On the application side I have two connections one for the "write" database and one for the "read replica" database.</p>
  
  <p>In my code if I do a "read" action I use the connection to the read replica. But when I go to insert or update I use the connection to the "write" database a.k.a. master. </p>
  
  <p>Is there better with django or flask that this is managed automatically. i.e. </p>
  
  <p>I would prefer to avoid specifying directly in code the connection to use and just have django or flask figure it out on their own. </p>