You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flask has ENV, DEBUG, TESTING and some other stuff - https://flask.palletsprojects.com/en/2.2.x/config/
app.config[“APPMAP”] might be the best option
Configuration is expected to be these flags on the app and then the code acts accordingly
So in other words it may be more idiomatic to check app.config rather than the environment
It's up to the developers to set those flags using whatever scheme they choose
The text was updated successfully, but these errors were encountered:
Going forward, I think we would like to support two ways of enabling AppMap for Django (
@Alan
correct me if I’m wrong) (edited)
1) APPMAP=true - enables all the recordings
2) Using Django “settings” - if the user loads a settings file that contains something like AppMap = True then AppMap will be enabled, unless APPMAP=false. (edited)
This would be pretty consistent with Rails, where request + remote recording is auto-enabled in development, unless APPMAP=false, and test cases recording is auto-enabled in test, unless APPMAP=false
An individual env var is also available to enable/disable each recording method, like APPMAP_RECORD_RSPEC=(true|false)
This is not really for normal usage though
It’s all documented on the AppMap doc site for appmap-ruby, so check that and see if anything is missing and/or unclear
The main point is, using settings files seems to be idiomatic for Python, so we can support that. According to Alan, using env vars is also fairly common, so we support that too.
Ideally, we’d like developers to put AppMap = True in their development and test settings so it’s just on all the time. (edited)
Uh oh!
There was an error while loading. Please reload this page.
Similar pr in
appmap-ruby
getappmap/appmap-ruby#281Looked at Django and Flask, there are notes
Starting here - https://applanding.slack.com/archives/CQ5JFE1DY/p1663189579942259
About dev / test / prod in Django - https://stackoverflow.com/questions/10664244/django-how-to-manage-development-and-production-settings - tldr it's not really a standardized env var like rails.
Flask has ENV, DEBUG, TESTING and some other stuff - https://flask.palletsprojects.com/en/2.2.x/config/
app.config[“APPMAP”] might be the best option
Configuration is expected to be these flags on the app and then the code acts accordingly
So in other words it may be more idiomatic to check app.config rather than the environment
It's up to the developers to set those flags using whatever scheme they choose
The text was updated successfully, but these errors were encountered: