neil-s / mayballmarketplace

0 stars 0 forks source link

Switch development/production code in python #8

Open gfarrell opened 10 years ago

gfarrell commented 10 years ago

index.html template needs some sort of switch in python to exchange dev styles/scripts for production URIs

neil-s commented 10 years ago

We could write a middleware app that reads an environment variable, or a variable in the local settings.py, and then passes it to any template when a view renders it. Or simply add a line of code to each view to pass the variable to the template.

Why do we need different styles/scripts for dev and production though? EDIT: Never mind, just saw your facebook post, that makes sense.