workspace
stringclasses 1
value | channel
stringclasses 1
value | sentences
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
| sentence_id
stringlengths 44
53
| timestamp
float64 1.5B
1.56B
| __index_level_0__
int64 0
106k
|
---|---|---|---|---|---|---|---|
pythondev | help | I think things would be different if heroku were provider-agnostic | 2017-07-13T08:16:54.811633 | Meg | pythondev_help_Meg_2017-07-13T08:16:54.811633 | 1,499,933,814.811633 | 85,003 |
pythondev | help | eg, pick between Azure, AWS, DO, etc | 2017-07-13T08:17:07.816423 | Meg | pythondev_help_Meg_2017-07-13T08:17:07.816423 | 1,499,933,827.816423 | 85,004 |
pythondev | help | Ya, that's true | 2017-07-13T08:20:52.896142 | Thomasina | pythondev_help_Thomasina_2017-07-13T08:20:52.896142 | 1,499,934,052.896142 | 85,005 |
pythondev | help | So, after reading up I _think_ I kinda get _what_ a blueprint is now, except I don't really understand _why_ one should use blueprints. All the examples seem to show either very abstract things or super simple things that don't seem to benefit from a blueprint as far as I can understand. | 2017-07-13T08:45:07.457332 | Thomasina | pythondev_help_Thomasina_2017-07-13T08:45:07.457332 | 1,499,935,507.457332 | 85,006 |
pythondev | help | I have separate blueprints for standard view routes, for JSON APIs, and for admin and testing APIs. I can quickly turn off the whole admin and testing APIs by commenting out the single line that attaches that blueprint | 2017-07-13T08:52:58.654586 | Gabriele | pythondev_help_Gabriele_2017-07-13T08:52:58.654586 | 1,499,935,978.654586 | 85,007 |
pythondev | help | I can also mount all the routes in one blueprint with a different URL path with just one change | 2017-07-13T08:53:48.675695 | Gabriele | pythondev_help_Gabriele_2017-07-13T08:53:48.675695 | 1,499,936,028.675695 | 85,008 |
pythondev | help | yeah I actually have all of my blueprints feature toggleable by environment variables | 2017-07-13T08:55:00.706887 | Junita | pythondev_help_Junita_2017-07-13T08:55:00.706887 | 1,499,936,100.706887 | 85,009 |
pythondev | help | and essentially the benefit is modularity | 2017-07-13T08:55:32.721381 | Junita | pythondev_help_Junita_2017-07-13T08:55:32.721381 | 1,499,936,132.721381 | 85,010 |
pythondev | help | I see. Then, I suppose the difficulty I'm having is in understanding how I can use them in my own project. Hopefully it will become clearer after I learn more about them. | 2017-07-13T08:58:27.798373 | Thomasina | pythondev_help_Thomasina_2017-07-13T08:58:27.798373 | 1,499,936,307.798373 | 85,011 |
pythondev | help | _How_ to use them is very straightforward. The docs show that. _Why_ to use them is trickier, until you have done enough big projects that you start valuing modularity from the start. | 2017-07-13T08:59:39.830398 | Gabriele | pythondev_help_Gabriele_2017-07-13T08:59:39.830398 | 1,499,936,379.830398 | 85,012 |
pythondev | help | Yes, I do value modularity greatly but always felt that the package -> class -> property/method approach was comprehensive enough. Naturally I'm trying to think of something similar to blueprints in any other language but the examples I see for blueprints seem like things that - to me - in any other language could be done just as easily with classes. | 2017-07-13T09:03:03.928863 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:03:03.928863 | 1,499,936,583.928863 | 85,013 |
pythondev | help | And since Python has classes and the like this confuses me. | 2017-07-13T09:04:07.959205 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:04:07.959205 | 1,499,936,647.959205 | 85,014 |
pythondev | help | blueprints aren't a language feature, they're a Flask feature | 2017-07-13T09:04:20.965493 | Gabriele | pythondev_help_Gabriele_2017-07-13T09:04:20.965493 | 1,499,936,660.965493 | 85,015 |
pythondev | help | It's giving you a way to make a Flask app out of smaller sub-apps that you might want to mix and match, or change independently | 2017-07-13T09:04:47.978196 | Gabriele | pythondev_help_Gabriele_2017-07-13T09:04:47.978196 | 1,499,936,687.978196 | 85,016 |
pythondev | help | (assuming we're talking about Flask blueprints and not some other blueprints... just noticed we're not in <#C0LN2AD7T|flask>) | 2017-07-13T09:05:20.994066 | Gabriele | pythondev_help_Gabriele_2017-07-13T09:05:20.994066 | 1,499,936,720.994066 | 85,017 |
pythondev | help | I think an important point is that if you don’t see the need, you don’t need to use them. It’s worth exploring them to know they’re there, but you’ll know when you need them. | 2017-07-13T09:07:07.044823 | Junita | pythondev_help_Junita_2017-07-13T09:07:07.044823 | 1,499,936,827.044823 | 85,018 |
pythondev | help | Yes, I meant Flask. "Sub-apps"? So would you perhaps say that this is a way of building an app, but having different parts of the app actually be different apps, where each one is coded like an individual Flask app, and then everything is "plugged in" to each other? | 2017-07-13T09:07:14.047894 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:07:14.047894 | 1,499,936,834.047894 | 85,019 |
pythondev | help | If everything is working fine without them for you, there’s no need to over-engineer your project. | 2017-07-13T09:07:34.057705 | Junita | pythondev_help_Junita_2017-07-13T09:07:34.057705 | 1,499,936,854.057705 | 85,020 |
pythondev | help | they're not entirely 'sub-apps' but they are modular parts of a larger app, yes. | 2017-07-13T09:07:57.068381 | Gabriele | pythondev_help_Gabriele_2017-07-13T09:07:57.068381 | 1,499,936,877.068381 | 85,021 |
pythondev | help | <@Junita> If I don't implement them now though, and my Flask API grows in complexity over time, will it be a major headache when the time comes to use blueprints though? | 2017-07-13T09:08:26.082323 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:08:26.082323 | 1,499,936,906.082323 | 85,022 |
pythondev | help | I don’t think so. I refactored some things into blueprints on a previous app and it really wasn’t that bad. | 2017-07-13T09:08:45.091411 | Junita | pythondev_help_Junita_2017-07-13T09:08:45.091411 | 1,499,936,925.091411 | 85,023 |
pythondev | help | To the extent it will be a pain it will likely be untangling some of the things that have grown to annoying for you | 2017-07-13T09:09:34.115144 | Junita | pythondev_help_Junita_2017-07-13T09:09:34.115144 | 1,499,936,974.115144 | 85,024 |
pythondev | help | But with a good test suite refactoring isn’t so bad. So write good tests. :slightly_smiling_face: | 2017-07-13T09:09:56.125290 | Junita | pythondev_help_Junita_2017-07-13T09:09:56.125290 | 1,499,936,996.12529 | 85,025 |
pythondev | help | <@Junita> Ah ok. Thanks. :slightly_smiling_face: Then, would you perhaps be able to give me an example of where blueprints would be very useful? All the examples I see are abstract or purely for example and wouldn't be very helpful in a real-world scenario. | 2017-07-13T09:11:18.164928 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:11:18.164928 | 1,499,937,078.164928 | 85,026 |
pythondev | help | So one example is that as <@Gabriele> and I said, it’s quite easy to “turn on” and “turn off” a blueprint - I literally do it based on the presence of environment variables. | 2017-07-13T09:12:12.190742 | Junita | pythondev_help_Junita_2017-07-13T09:12:12.190742 | 1,499,937,132.190742 | 85,027 |
pythondev | help | so for example when I launched a product we had an Invite system | 2017-07-13T09:12:23.196045 | Junita | pythondev_help_Junita_2017-07-13T09:12:23.196045 | 1,499,937,143.196045 | 85,028 |
pythondev | help | which was a blueprint, and we were able to turn on and off the need for invites via a simple environment variable change, no need to rebuild and redeploy. | 2017-07-13T09:12:48.208155 | Junita | pythondev_help_Junita_2017-07-13T09:12:48.208155 | 1,499,937,168.208155 | 85,029 |
pythondev | help | that’s perhaps a pretty niche example of a concrete use though - I really think the modularity is the real benefit. | 2017-07-13T09:13:10.218730 | Junita | pythondev_help_Junita_2017-07-13T09:13:10.218730 | 1,499,937,190.21873 | 85,030 |
pythondev | help | Things just are cleaner and easier to work with, reason about, etc. when working with them, in my opinion. But that’s a bit more subjective | 2017-07-13T09:13:42.234202 | Junita | pythondev_help_Junita_2017-07-13T09:13:42.234202 | 1,499,937,222.234202 | 85,031 |
pythondev | help | Would that be very different from a simple `if os.environ['INVITE_PAGE'] == 1:` in the code for the endpoint where the page would be though? | 2017-07-13T09:14:47.266210 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:14:47.266210 | 1,499,937,287.26621 | 85,032 |
pythondev | help | you'd have to add that for every single endpoint | 2017-07-13T09:15:11.278218 | Gabriele | pythondev_help_Gabriele_2017-07-13T09:15:11.278218 | 1,499,937,311.278218 | 85,033 |
pythondev | help | Oh, good point! (pun intended :wink: ) | 2017-07-13T09:15:24.284901 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:15:24.284901 | 1,499,937,324.284901 | 85,034 |
pythondev | help | Right, as well as any other associated stuff you’ve done. | 2017-07-13T09:16:03.304540 | Junita | pythondev_help_Junita_2017-07-13T09:16:03.304540 | 1,499,937,363.30454 | 85,035 |
pythondev | help | I'm using Flask-Restful which means that the various methods for endpoints (POST, GET, PATCH, etc.) are grouped into classes. However it does feel a bit messy since that means `/users/`, `/users/<user_id>/`, `/users/auth/`, `/users/<user_id>/friends/`, `/users/<user_id>/friends/requests/` and others all have their own classes (some with similar names...I mean how am I supposed to meaningfully differentiate the first two by name?). I'm wondering if this setup could benefit from blueprints in some way. | 2017-07-13T09:20:27.437861 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:20:27.437861 | 1,499,937,627.437861 | 85,036 |
pythondev | help | Maybe. I only briefly messed with Flask Restful so I’m not too familiar with it. | 2017-07-13T09:21:43.476599 | Junita | pythondev_help_Junita_2017-07-13T09:21:43.476599 | 1,499,937,703.476599 | 85,037 |
pythondev | help | I'm wondering if anyone even uses Flask-Restful for complex APIs, or if it's generally only used for simple ones. | 2017-07-13T09:25:50.606681 | Thomasina | pythondev_help_Thomasina_2017-07-13T09:25:50.606681 | 1,499,937,950.606681 | 85,038 |
pythondev | help | Gonna use this <https://pythonhosted.org/Flask-Testing/> and wondering if it's ok to put my testing code within my app's main script, or if it should be in its own script | 2017-07-13T10:38:59.279494 | Thomasina | pythondev_help_Thomasina_2017-07-13T10:38:59.279494 | 1,499,942,339.279494 | 85,039 |
pythondev | help | testing code should be outside the app | 2017-07-13T10:39:50.311894 | Gabriele | pythondev_help_Gabriele_2017-07-13T10:39:50.311894 | 1,499,942,390.311894 | 85,040 |
pythondev | help | So, in its own module then? | 2017-07-13T10:40:14.327339 | Thomasina | pythondev_help_Thomasina_2017-07-13T10:40:14.327339 | 1,499,942,414.327339 | 85,041 |
pythondev | help | i use flask-restplus and from what i understand it is inspired from flask-restful. | 2017-07-13T10:40:26.335664 | Johana | pythondev_help_Johana_2017-07-13T10:40:26.335664 | 1,499,942,426.335664 | 85,042 |
pythondev | help | I believe using a `class` and inheriting from Resource is a the same pattern. | 2017-07-13T10:41:12.365586 | Johana | pythondev_help_Johana_2017-07-13T10:41:12.365586 | 1,499,942,472.365586 | 85,043 |
pythondev | help | I usually have my tests in a separate directory alongside the package for the main app. But I don't use Flask-Testing or any other extension so I don't know what that recommends. | 2017-07-13T10:43:20.447804 | Gabriele | pythondev_help_Gabriele_2017-07-13T10:43:20.447804 | 1,499,942,600.447804 | 85,044 |
pythondev | help | `print(__name__)` would print the name of the current...method?...module? | 2017-07-13T12:11:27.870004 | Thomasina | pythondev_help_Thomasina_2017-07-13T12:11:27.870004 | 1,499,947,887.870004 | 85,045 |
pythondev | help | It should be the module. <https://docs.python.org/3/library/__main__.html> | 2017-07-13T12:15:15.005209 | Gabriele | pythondev_help_Gabriele_2017-07-13T12:15:15.005209 | 1,499,948,115.005209 | 85,046 |
pythondev | help | So if my primary application script is `app.py` and I have `app = Flask(__name__)` I suppose I'm setting it to `app` then? I'd test but my code is in the middle of a major change so I can't run it. | 2017-07-13T12:16:37.053581 | Thomasina | pythondev_help_Thomasina_2017-07-13T12:16:37.053581 | 1,499,948,197.053581 | 85,047 |
pythondev | help | Yes, unless you're running the app.py file directly | 2017-07-13T12:17:45.093325 | Gabriele | pythondev_help_Gabriele_2017-07-13T12:17:45.093325 | 1,499,948,265.093325 | 85,048 |
pythondev | help | It's best to explicitly replace `__name__` with a string in the Flask initializer | 2017-07-13T12:18:17.112740 | Beula | pythondev_help_Beula_2017-07-13T12:18:17.112740 | 1,499,948,297.11274 | 85,049 |
pythondev | help | Hi guys! I have launced an aws instance with SES(full access) role, Now how can i send an email to AmazonSES without smtp {username/password} credentials on server. An example in python or any relevant link would be great. Basically i dont want the creds to be on server. | 2017-07-13T12:47:34.137391 | Jessie | pythondev_help_Jessie_2017-07-13T12:47:34.137391 | 1,499,950,054.137391 | 85,050 |
pythondev | help | ```if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)```
So this should not be in the production code, otherwise it'll run the Flask dev server, right? | 2017-07-13T13:12:28.999447 | Thomasina | pythondev_help_Thomasina_2017-07-13T13:12:28.999447 | 1,499,951,548.999447 | 85,051 |
pythondev | help | No that is fine, that only runs if you directly call `python file.py` | 2017-07-13T13:23:32.368820 | Beula | pythondev_help_Beula_2017-07-13T13:23:32.368820 | 1,499,952,212.36882 | 85,052 |
pythondev | help | But if you use gunicorn, `gunicorn file:app` it would not run the devserver | 2017-07-13T13:23:47.376973 | Beula | pythondev_help_Beula_2017-07-13T13:23:47.376973 | 1,499,952,227.376973 | 85,053 |
pythondev | help | Ah, ok. gunicorn runs a specific function unlike Python which runs the entire script...I should've noticed that. Thanks! | 2017-07-13T13:24:25.398893 | Thomasina | pythondev_help_Thomasina_2017-07-13T13:24:25.398893 | 1,499,952,265.398893 | 85,054 |
pythondev | help | <@Beula> In <https://github.com/pyslackers/website-old/blob/master/pyslackers/> you have `pyslackers.__main__:app` in `Dockerfile` but in `__main__.py` there is no `app` function. Instead `app` is a variable as in `app = create_app(resolve_config(os.getenv('PY_ENV', 'dev')))`. How does that work? | 2017-07-13T13:27:26.501395 | Thomasina | pythondev_help_Thomasina_2017-07-13T13:27:26.501395 | 1,499,952,446.501395 | 85,055 |
pythondev | help | Gunicorn uses that as the WSGI gateway, it's the "callable" for the spec | 2017-07-13T13:28:16.529715 | Beula | pythondev_help_Beula_2017-07-13T13:28:16.529715 | 1,499,952,496.529715 | 85,056 |
pythondev | help | So `app` is a `Flask` instance, and that is a callable (per how wsgi works) | 2017-07-13T13:28:38.542810 | Beula | pythondev_help_Beula_2017-07-13T13:28:38.542810 | 1,499,952,518.54281 | 85,057 |
pythondev | help | Oh, wow. @.@ Every time I think I'm understanding everything there's something new to learn. I'll add WSGI to my list of things to learn more about. | 2017-07-13T13:29:25.569963 | Thomasina | pythondev_help_Thomasina_2017-07-13T13:29:25.569963 | 1,499,952,565.569963 | 85,058 |
pythondev | help | you don't have to worry too much about it fortunately - just enough | 2017-07-13T13:30:19.602467 | Beula | pythondev_help_Beula_2017-07-13T13:30:19.602467 | 1,499,952,619.602467 | 85,059 |
pythondev | help | Oh, really? Good to know. Thanks! | 2017-07-13T13:35:58.801610 | Thomasina | pythondev_help_Thomasina_2017-07-13T13:35:58.801610 | 1,499,952,958.80161 | 85,060 |
pythondev | help | Wow. Ya, I expected it to be quite a bit more complicated. Makes sense! | 2017-07-13T13:39:01.904689 | Thomasina | pythondev_help_Thomasina_2017-07-13T13:39:01.904689 | 1,499,953,141.904689 | 85,061 |
pythondev | help | By the way, you have `from pyslackers import create_app, models` in __main__.py but there is no `pyslackers` module...? | 2017-07-13T13:40:10.945178 | Thomasina | pythondev_help_Thomasina_2017-07-13T13:40:10.945178 | 1,499,953,210.945178 | 85,062 |
pythondev | help | `pyslackers` is the package the whole app is in | 2017-07-13T14:42:09.124146 | Beula | pythondev_help_Beula_2017-07-13T14:42:09.124146 | 1,499,956,929.124146 | 85,063 |
pythondev | help | `create_app` is from `pyslackers.__init__` | 2017-07-13T14:42:16.128644 | Beula | pythondev_help_Beula_2017-07-13T14:42:16.128644 | 1,499,956,936.128644 | 85,064 |
pythondev | help | models is another module | 2017-07-13T14:42:25.133280 | Beula | pythondev_help_Beula_2017-07-13T14:42:25.133280 | 1,499,956,945.13328 | 85,065 |
pythondev | help | <@Beula> Oh ok, that's what I thought but for some reason when I run my app - Broadway - locally with Python I get "No module named broadway" from the line `from broadway import create_app` | 2017-07-13T15:03:33.868383 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:03:33.868383 | 1,499,958,213.868383 | 85,066 |
pythondev | help | I'm thinking maybe this is from running __main__.py directly, and perhaps I need a script to run from the parent folder that acts as the true primary script, but I'm not sure | 2017-07-13T15:04:59.918391 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:04:59.918391 | 1,499,958,299.918391 | 85,067 |
pythondev | help | yeah, you want `python -m broadway` | 2017-07-13T15:05:26.933591 | Beula | pythondev_help_Beula_2017-07-13T15:05:26.933591 | 1,499,958,326.933591 | 85,068 |
pythondev | help | the `-m` runs it as a module, executing `__main__.py` | 2017-07-13T15:05:36.939466 | Beula | pythondev_help_Beula_2017-07-13T15:05:36.939466 | 1,499,958,336.939466 | 85,069 |
pythondev | help | but it sets the PYTHONPATH to be the CWD | 2017-07-13T15:05:43.943368 | Beula | pythondev_help_Beula_2017-07-13T15:05:43.943368 | 1,499,958,343.943368 | 85,070 |
pythondev | help | Ah, ok! That worked though. Even though I didn't know better I did think that running `__init__.py` or `__main__.py` directly seemed a bit...off. Haha I'm so thankful for your help and this whole Slack. :slightly_smiling_face: | 2017-07-13T15:08:36.036122 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:08:36.036122 | 1,499,958,516.036122 | 85,071 |
pythondev | help | Are Python devs just more helpful people? Seems like it. | 2017-07-13T15:08:57.046812 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:08:57.046812 | 1,499,958,537.046812 | 85,072 |
pythondev | help | We’re more efficient than other developers, so we have time to be helpful. :stuck_out_tongue: | 2017-07-13T15:10:00.079861 | Junita | pythondev_help_Junita_2017-07-13T15:10:00.079861 | 1,499,958,600.079861 | 85,073 |
pythondev | help | I am at a ruby job and avoid it a lot | 2017-07-13T15:11:48.136200 | Beula | pythondev_help_Beula_2017-07-13T15:11:48.136200 | 1,499,958,708.1362 | 85,074 |
pythondev | help | Haha, while initially I wasn't crazy about Python, the more I learn about it the more I like it, and one of those reasons is that I feel it can be very efficient, to create all kinds of things rather quickly | 2017-07-13T15:11:53.138633 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:11:53.138633 | 1,499,958,713.138633 | 85,075 |
pythondev | help | I use the `__main__` trick to get around some annoyances with importing, python pathing, etc. Because with that way, gunicorn can pick it up and I keep the top level directory clean | 2017-07-13T15:12:38.162050 | Beula | pythondev_help_Beula_2017-07-13T15:12:38.162050 | 1,499,958,758.16205 | 85,076 |
pythondev | help | I hate how the top level directory can get so cluttered :smile: | 2017-07-13T15:12:46.166006 | Beula | pythondev_help_Beula_2017-07-13T15:12:46.166006 | 1,499,958,766.166006 | 85,077 |
pythondev | help | Ya, the cluttered top level was something that I disliked. Before this I was making apps with Adobe Air and most of the time I'd have a single script in my top level and then have everything else in sub directories which felt really organized. Glad to know how to do this in Python. | 2017-07-13T15:14:24.217834 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:14:24.217834 | 1,499,958,864.217834 | 85,078 |
pythondev | help | I think I may be slightly non-standard in that regard. But since `flask` introduced the CLI, I have been liking this approach. | 2017-07-13T15:15:17.245396 | Beula | pythondev_help_Beula_2017-07-13T15:15:17.245396 | 1,499,958,917.245396 | 85,079 |
pythondev | help | For aiohttp apps, it made it so I could just have an optional CLI to run the application | 2017-07-13T15:15:35.255086 | Beula | pythondev_help_Beula_2017-07-13T15:15:35.255086 | 1,499,958,935.255086 | 85,080 |
pythondev | help | flask introduced a CLI? heh. here I’ve been making a manage.py entry point for all these years. | 2017-07-13T15:18:16.338741 | Junita | pythondev_help_Junita_2017-07-13T15:18:16.338741 | 1,499,959,096.338741 | 85,081 |
pythondev | help | yea it uses click now. | 2017-07-13T15:26:41.606815 | Johana | pythondev_help_Johana_2017-07-13T15:26:41.606815 | 1,499,959,601.606815 | 85,082 |
pythondev | help | I suppose that makes sense. | 2017-07-13T15:30:30.729312 | Junita | pythondev_help_Junita_2017-07-13T15:30:30.729312 | 1,499,959,830.729312 | 85,083 |
pythondev | help | Oh wait...do I not need `manage.py` for my DB deployment then? | 2017-07-13T15:31:04.747960 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:31:04.747960 | 1,499,959,864.74796 | 85,084 |
pythondev | help | you can still have a manage.py. | 2017-07-13T15:32:08.781814 | Johana | pythondev_help_Johana_2017-07-13T15:32:08.781814 | 1,499,959,928.781814 | 85,085 |
pythondev | help | the click cli in flask supports it. | 2017-07-13T15:32:19.787858 | Johana | pythondev_help_Johana_2017-07-13T15:32:19.787858 | 1,499,959,939.787858 | 85,086 |
pythondev | help | <http://flask.pocoo.org/docs/0.12/cli/#custom-scripts> | 2017-07-13T15:32:50.804222 | Johana | pythondev_help_Johana_2017-07-13T15:32:50.804222 | 1,499,959,970.804222 | 85,087 |
pythondev | help | it’s funny because I’ve been meaning to go through the Flask docs again because I knew there were probably a ton of things like that which have changed over the years. | 2017-07-13T15:34:16.849933 | Junita | pythondev_help_Junita_2017-07-13T15:34:16.849933 | 1,499,960,056.849933 | 85,088 |
pythondev | help | It's pretty nice, for example with the `flask-migrate` extension:
```
export FLASK_APP=website/__main__.py
flask db migrate
flask run
``` | 2017-07-13T15:42:16.100445 | Beula | pythondev_help_Beula_2017-07-13T15:42:16.100445 | 1,499,960,536.100445 | 85,089 |
pythondev | help | So I can use this to make deployment more elegant than having to run `python manage.py db init`, `python manage.py db migrate`, and `python manage.py db upgrade` separately? | 2017-07-13T15:43:15.131144 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:43:15.131144 | 1,499,960,595.131144 | 85,090 |
pythondev | help | yeah I was always writing that stuff myself like a sucker | 2017-07-13T15:43:21.134028 | Junita | pythondev_help_Junita_2017-07-13T15:43:21.134028 | 1,499,960,601.134028 | 85,091 |
pythondev | help | Yeah, you can make a custom command that does those for you | 2017-07-13T15:43:56.152991 | Beula | pythondev_help_Beula_2017-07-13T15:43:56.152991 | 1,499,960,636.152991 | 85,092 |
pythondev | help | `db init`, if using flask-migrate, is only a 1 time thing though, just setting up the local config and migrations folder | 2017-07-13T15:44:16.162975 | Beula | pythondev_help_Beula_2017-07-13T15:44:16.162975 | 1,499,960,656.162975 | 85,093 |
pythondev | help | so neither `db migrate` nor `db init` would be needed during deployment | 2017-07-13T15:44:33.171554 | Beula | pythondev_help_Beula_2017-07-13T15:44:33.171554 | 1,499,960,673.171554 | 85,094 |
pythondev | help | Oh, nice. Guess I'm kind of micro-optimizing by wanting to combine the init and migrate into one command as well then. Haha | 2017-07-13T15:52:05.411570 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:52:05.411570 | 1,499,961,125.41157 | 85,095 |
pythondev | help | I do the upgrade/run at boot each time so it's always up to date for prod ¯\_(ツ)_/¯ | 2017-07-13T15:52:42.431625 | Beula | pythondev_help_Beula_2017-07-13T15:52:42.431625 | 1,499,961,162.431625 | 85,096 |
pythondev | help | but init is one time ever for a project, and migrate creates the migrations | 2017-07-13T15:53:00.441509 | Beula | pythondev_help_Beula_2017-07-13T15:53:00.441509 | 1,499,961,180.441509 | 85,097 |
pythondev | help | so I don't think you need those often enough, those are developer run manually | 2017-07-13T15:53:11.447047 | Beula | pythondev_help_Beula_2017-07-13T15:53:11.447047 | 1,499,961,191.447047 | 85,098 |
pythondev | help | Ah, ok. | 2017-07-13T15:53:55.471269 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:53:55.471269 | 1,499,961,235.471269 | 85,099 |
pythondev | help | Good point | 2017-07-13T15:54:03.475567 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:54:03.475567 | 1,499,961,243.475567 | 85,100 |
pythondev | help | In `__main__.py`, `from broadway import create_app` results in `No module named 'broadway'`... Hmm... It's definitely the right name | 2017-07-13T15:54:11.479755 | Thomasina | pythondev_help_Thomasina_2017-07-13T15:54:11.479755 | 1,499,961,251.479755 | 85,101 |
pythondev | help | how are you running it? | 2017-07-13T15:54:32.491210 | Beula | pythondev_help_Beula_2017-07-13T15:54:32.491210 | 1,499,961,272.49121 | 85,102 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.