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’m currently experimenting with spaced practice and unstructured information.
2017-08-01T12:30:29.918123
Johana
pythondev_help_Johana_2017-08-01T12:30:29.918123
1,501,590,629.918123
88,403
pythondev
help
I’m running into this in django but I think it’s a conceptual question that anybody can answer. I’m trying to write unit tests and in one of my cases, I get “myapp.models.DoesNotExist: MyModelClass matching query does not exist.” I can’t seem to actually access this exception in django and it does not seem like the parent class, “ObjectDoesNotExist” can handle this exception either. What other ways could I write my unittest for it to pass in this case?
2017-08-01T12:48:31.558178
Kristopher
pythondev_help_Kristopher_2017-08-01T12:48:31.558178
1,501,591,711.558178
88,404
pythondev
help
It should me `myapp.models.ModelClass.DoesNotExist` and you can catch it
2017-08-01T12:50:28.628213
Beula
pythondev_help_Beula_2017-08-01T12:50:28.628213
1,501,591,828.628213
88,405
pythondev
help
You should be able to do: ``` with self.assertRaises(ModelClass.DoesNotExist): pass # test logic here that fails if no raise is received ```
2017-08-01T12:50:55.643601
Beula
pythondev_help_Beula_2017-08-01T12:50:55.643601
1,501,591,855.643601
88,406
pythondev
help
This is for a 404, but similar idea: <https://github.com/pyslackers/website/blob/master/blog/tests.py#L91>
2017-08-01T12:51:25.661868
Beula
pythondev_help_Beula_2017-08-01T12:51:25.661868
1,501,591,885.661868
88,407
pythondev
help
<@Beula> I tried that too and it didn’t seem to do the trick.
2017-08-01T12:57:28.884583
Kristopher
pythondev_help_Kristopher_2017-08-01T12:57:28.884583
1,501,592,248.884583
88,408
pythondev
help
Can you show the actual code? It sounds like this is a <#C0LMFRMB5|django> specific problem, so best to bring the conversation there
2017-08-01T12:58:23.918135
Beula
pythondev_help_Beula_2017-08-01T12:58:23.918135
1,501,592,303.918135
88,409
pythondev
help
<@Beula> Which would be the most useful code in this case? The test written?
2017-08-01T13:07:55.262982
Kristopher
pythondev_help_Kristopher_2017-08-01T13:07:55.262982
1,501,592,875.262982
88,410
pythondev
help
I didn’t notice there’s a django channel
2017-08-01T13:08:21.278523
Kristopher
pythondev_help_Kristopher_2017-08-01T13:08:21.278523
1,501,592,901.278523
88,411
pythondev
help
No worries, see you over there :slightly_smiling_face:
2017-08-01T13:09:12.307572
Beula
pythondev_help_Beula_2017-08-01T13:09:12.307572
1,501,592,952.307572
88,412
pythondev
help
hello all, i am trying to learn python deeply
2017-08-01T13:10:24.348387
Josef
pythondev_help_Josef_2017-08-01T13:10:24.348387
1,501,593,024.348387
88,413
pythondev
help
i came across a problem, like ransom note on hacker rank and the solution they used is counter function from collections
2017-08-01T13:11:01.369708
Josef
pythondev_help_Josef_2017-08-01T13:11:01.369708
1,501,593,061.369708
88,414
pythondev
help
def ransom_note(magazine, rasom): return (Counter(rasom) - Counter(magazine)) == {}
2017-08-01T13:11:12.375771
Josef
pythondev_help_Josef_2017-08-01T13:11:12.375771
1,501,593,072.375771
88,415
pythondev
help
but it will fail if the letters are jumbled
2017-08-01T13:11:25.383387
Josef
pythondev_help_Josef_2017-08-01T13:11:25.383387
1,501,593,085.383387
88,416
pythondev
help
print(ransom_note(‘igve em grand one dayto night’, ‘give one grand today’))
2017-08-01T13:11:32.387503
Josef
pythondev_help_Josef_2017-08-01T13:11:32.387503
1,501,593,092.387503
88,417
pythondev
help
for example
2017-08-01T13:11:36.389929
Josef
pythondev_help_Josef_2017-08-01T13:11:36.389929
1,501,593,096.389929
88,418
pythondev
help
Please use code formatting when posting code :slightly_smiling_face: ``` def ransom_note(magazine, rasom): return (Counter(rasom) - Counter(magazine)) == {} ``` Use three backticks before and after, on new lines (` ``` `)
2017-08-01T13:17:21.592246
Beula
pythondev_help_Beula_2017-08-01T13:17:21.592246
1,501,593,441.592246
88,419
pythondev
help
working in redshift instance, what permission level do you need to create temporary tables?
2017-08-01T13:27:04.936578
Winnifred
pythondev_help_Winnifred_2017-08-01T13:27:04.936578
1,501,594,024.936578
88,420
pythondev
help
You can grant temporary table creation on its own
2017-08-01T13:29:29.021313
Patty
pythondev_help_Patty_2017-08-01T13:29:29.021313
1,501,594,169.021313
88,421
pythondev
help
<http://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html>
2017-08-01T13:29:37.026131
Patty
pythondev_help_Patty_2017-08-01T13:29:37.026131
1,501,594,177.026131
88,422
pythondev
help
thanks, <@Patty>
2017-08-01T13:30:41.064815
Winnifred
pythondev_help_Winnifred_2017-08-01T13:30:41.064815
1,501,594,241.064815
88,423
pythondev
help
I have a problem with sorl-thumbnail, the media path I'm getting is for a file not saved (folder isn't created in cache and neither is the file)
2017-08-02T00:36:09.506711
Beverley
pythondev_help_Beverley_2017-08-02T00:36:09.506711
1,501,634,169.506711
88,424
pythondev
help
hi guys, i’m trying to create: private pip package module, i’m following this `<https://stackoverflow.com/questions/4830856/is-it-possible-to-use-pip-to-install-a-package-from-a-private-github-repository>` The problem is look like I cant spec the version ( 1.01, 1.03…) Do we have other way to do this private pip package?
2017-08-02T00:42:57.586681
Hermina
pythondev_help_Hermina_2017-08-02T00:42:57.586681
1,501,634,577.586681
88,425
pythondev
help
please use code formatting, which I believe I mentioned to you earlier this week. Either three back ticks before and after the code (` ``` `), on their own lines. or create a snippet with the plus next to the input box (the little plus) <@Beverley> I'm going to delete what's there.
2017-08-02T00:52:49.686796
Beula
pythondev_help_Beula_2017-08-02T00:52:49.686796
1,501,635,169.686796
88,426
pythondev
help
okay let me fix that
2017-08-02T00:54:19.701847
Beverley
pythondev_help_Beverley_2017-08-02T00:54:19.701847
1,501,635,259.701847
88,427
pythondev
help
If you have tags or branches to install from, you should be able to append: `@1.01` before any hashes <@Hermina> It being private shouldn't affect that, for example: ``` pip install -e git@git://github.com/mrasband/[email protected]#egg=project ```
2017-08-02T00:54:45.706282
Beula
pythondev_help_Beula_2017-08-02T00:54:45.706282
1,501,635,285.706282
88,428
pythondev
help
```In [1]: from sorl.thumbnail import get_thumbnail In [2]: from PIL import Image as PILImage In [3]: image = PILImage.open('revamp/media/27fd720f410e8cd57600b409b7cbea15.jpg') In [4]: im = get_thumbnail(image, '{0}x{1}'.format(450, 500), quality=100) In [5]: im.url Out[5]: '/media/cache/33/71/33711b06366a689da7ba758d8a08cd17.jpg' [7:37] samuel@samuel-pc:~/Documents/code/revamp/revamp/media$ cd cache/33 samuel@samuel-pc:~/Documents/code/revamp/revamp/media/cache/33$ cd 71 bash: cd: 71: No such file or directory```
2017-08-02T00:55:19.711824
Beverley
pythondev_help_Beverley_2017-08-02T00:55:19.711824
1,501,635,319.711824
88,429
pythondev
help
having an issue with sorl thumbnail it's giving back a file location but it's not created
2017-08-02T00:56:12.720572
Beverley
pythondev_help_Beverley_2017-08-02T00:56:12.720572
1,501,635,372.720572
88,430
pythondev
help
thanks, i’ll try that :slightly_smiling_face:
2017-08-02T00:57:33.733953
Hermina
pythondev_help_Hermina_2017-08-02T00:57:33.733953
1,501,635,453.733953
88,431
pythondev
help
<@Beverley> if that `im.url` is to believed, the image path is relative to the root of your disk, so try: ``` $ ls /media/cache/ ``` And see if the dirs are there
2017-08-02T00:59:14.750649
Beula
pythondev_help_Beula_2017-08-02T00:59:14.750649
1,501,635,554.750649
88,432
pythondev
help
If there is a leading slash, it's usually relative to the root of the hard disk. If it's relative it's either `media/thing/...` or `./media/thing/...`
2017-08-02T01:00:03.759096
Beula
pythondev_help_Beula_2017-08-02T01:00:03.759096
1,501,635,603.759096
88,433
pythondev
help
It supports branches too, so instead of `v1.01` it could be `master`
2017-08-02T01:01:31.776519
Beula
pythondev_help_Beula_2017-08-02T01:01:31.776519
1,501,635,691.776519
88,434
pythondev
help
maybe not I'm using it with django and I think it's the media_path = '/media/'
2017-08-02T01:02:52.790788
Beverley
pythondev_help_Beverley_2017-08-02T01:02:52.790788
1,501,635,772.790788
88,435
pythondev
help
what you show above is just a shell
2017-08-02T01:04:45.811269
Beula
pythondev_help_Beula_2017-08-02T01:04:45.811269
1,501,635,885.811269
88,436
pythondev
help
Is that a django shell, specifically?
2017-08-02T01:04:53.812625
Beula
pythondev_help_Beula_2017-08-02T01:04:53.812625
1,501,635,893.812625
88,437
pythondev
help
yes it is
2017-08-02T01:05:52.823188
Beverley
pythondev_help_Beverley_2017-08-02T01:05:52.823188
1,501,635,952.823188
88,438
pythondev
help
let me edit the media path just to confirm
2017-08-02T01:06:31.830043
Beverley
pythondev_help_Beverley_2017-08-02T01:06:31.830043
1,501,635,991.830043
88,439
pythondev
help
it's the path
2017-08-02T01:07:47.843090
Beverley
pythondev_help_Beverley_2017-08-02T01:07:47.843090
1,501,636,067.84309
88,440
pythondev
help
```In [8]: im.url Out[8]: '/media-path/cache/f3/75/f3751235afa5727df429651e770c5de6.jpg' ```
2017-08-02T01:07:52.843804
Beverley
pythondev_help_Beverley_2017-08-02T01:07:52.843804
1,501,636,072.843804
88,441
pythondev
help
changed it to ```media-path```
2017-08-02T01:08:08.846654
Beverley
pythondev_help_Beverley_2017-08-02T01:08:08.846654
1,501,636,088.846654
88,442
pythondev
help
Which backend are you using? Looks like they just throw that in a cache like redis, cacheddb, or memcached
2017-08-02T01:10:07.865942
Beula
pythondev_help_Beula_2017-08-02T01:10:07.865942
1,501,636,207.865942
88,443
pythondev
help
may be worth listing the keys in whichever it's hooked up to
2017-08-02T01:10:26.869169
Beula
pythondev_help_Beula_2017-08-02T01:10:26.869169
1,501,636,226.869169
88,444
pythondev
help
<https://sorl-thumbnail.readthedocs.io/en/latest/requirements.html>
2017-08-02T01:10:38.871213
Beula
pythondev_help_Beula_2017-08-02T01:10:38.871213
1,501,636,238.871213
88,445
pythondev
help
From their _how it works_ page: &gt; When you use the thumbnail template tag sorl-thumbnail looks up the thumbnail in a Key Value Store. The key for a thumbnail is generated from its filename and storage. The thumbnail filename in turn is generated from the source and requested thumbnail size and options. If the key for the thumbnail is found in the Key Value Store, the serialized thumbnail information is fetched from it and returned. If the thumbnail key is not found there sorl-thumbnail continues to generate the thumbnail and stores necessary information in the Key Value Store. I am not familiar with the lib, but it appears to cache all thumbs
2017-08-02T01:12:03.885772
Beula
pythondev_help_Beula_2017-08-02T01:12:03.885772
1,501,636,323.885772
88,446
pythondev
help
not using either of those just a plain django installation +pillow and sorl thumbnail
2017-08-02T01:14:45.912916
Beverley
pythondev_help_Beverley_2017-08-02T01:14:45.912916
1,501,636,485.912916
88,447
pythondev
help
this works but without the cache ```im = PILImage.open('revamp'+image_url) im.thumbnail((width, height), PILImage.ANTIALIAS) image = PILImage.new('RGBA', (width, height), (255, 255, 255, 0)) image.paste(im, (int((width - image.size[0]) / 2), int((height - image.size[1]) / 2))) filename = random_filename(path='revamp/media/cache/') image.save(filename)```
2017-08-02T01:19:28.959096
Beverley
pythondev_help_Beverley_2017-08-02T01:19:28.959096
1,501,636,768.959096
88,448
pythondev
help
```from PIL import Image as PILImage```
2017-08-02T01:19:50.962637
Beverley
pythondev_help_Beverley_2017-08-02T01:19:50.962637
1,501,636,790.962637
88,449
pythondev
help
May be worth taking this to <#C0LMFRMB5|django>
2017-08-02T01:20:07.965619
Beula
pythondev_help_Beula_2017-08-02T01:20:07.965619
1,501,636,807.965619
88,450
pythondev
help
I'd bet someone else has had an experience with it
2017-08-02T01:20:30.969535
Beula
pythondev_help_Beula_2017-08-02T01:20:30.969535
1,501,636,830.969535
88,451
pythondev
help
yes will do
2017-08-02T01:20:51.973184
Beverley
pythondev_help_Beverley_2017-08-02T01:20:51.973184
1,501,636,851.973184
88,452
pythondev
help
I want to replace `max_connections = 100` to `max_connections = 150` inside a file. should sed do it?
2017-08-02T02:01:26.424287
Gabrielle
pythondev_help_Gabrielle_2017-08-02T02:01:26.424287
1,501,639,286.424287
88,453
pythondev
help
nvm got it :slightly_smiling_face:.
2017-08-02T02:04:44.471297
Gabrielle
pythondev_help_Gabrielle_2017-08-02T02:04:44.471297
1,501,639,484.471297
88,454
pythondev
help
Haha, this should be in <#C3X4T24LB|databases> ;)
2017-08-02T02:14:47.607408
Joann
pythondev_help_Joann_2017-08-02T02:14:47.607408
1,501,640,087.607408
88,455
pythondev
help
sed could do it, of course, tho not sure that's what I'd reach for first.
2017-08-02T02:15:29.617740
Joann
pythondev_help_Joann_2017-08-02T02:15:29.617740
1,501,640,129.61774
88,456
pythondev
help
Right now doing it with this ``` sed -i -- 's/max_connections = 100/max_connections = 150/g' /var/lib/pgsql/data/postgresql.conf sed -i "60ilisten_addresses = '*'" /var/lib/pgsql/data/postgresql.conf ```
2017-08-02T02:22:00.703853
Gabrielle
pythondev_help_Gabrielle_2017-08-02T02:22:00.703853
1,501,640,520.703853
88,457
pythondev
help
I want to have REST api framework to add routes on apache-airflow and use REST requests to add and schedule jobs. There isn’t an option from airflow right now. Any suggestions?
2017-08-02T03:18:31.560227
Clarence
pythondev_help_Clarence_2017-08-02T03:18:31.560227
1,501,643,911.560227
88,458
pythondev
help
there is a plugin available though, <https://github.com/teamclairvoyant/airflow-rest-api-plugin> but the end points are fixed and my intention is to add my own routes.
2017-08-02T03:19:42.580801
Clarence
pythondev_help_Clarence_2017-08-02T03:19:42.580801
1,501,643,982.580801
88,459
pythondev
help
Does anyone have any clue to why my page with come up with over 50 errors telling me 'Failed to load resource ', When every other page is working fine hhmmm
2017-08-02T03:34:04.845832
Robbin
pythondev_help_Robbin_2017-08-02T03:34:04.845832
1,501,644,844.845832
88,460
pythondev
help
<@Robbin> I think `Failed to load resource` happen when you have a 404 for a specific resource
2017-08-02T03:44:29.045753
Ciera
pythondev_help_Ciera_2017-08-02T03:44:29.045753
1,501,645,469.045753
88,461
pythondev
help
Yup, i cant figure out why it would be doing this on only one page haha,
2017-08-02T03:44:57.054675
Robbin
pythondev_help_Robbin_2017-08-02T03:44:57.054675
1,501,645,497.054675
88,462
pythondev
help
Just a single page is giving me the 404's
2017-08-02T03:45:19.062003
Robbin
pythondev_help_Robbin_2017-08-02T03:45:19.062003
1,501,645,519.062003
88,463
pythondev
help
well check the url. typo ? trailing `/` ?
2017-08-02T03:45:50.072340
Ciera
pythondev_help_Ciera_2017-08-02T03:45:50.072340
1,501,645,550.07234
88,464
pythondev
help
Hi, thanks, I can do it now, I found 2 way to install the package ```pip install -e <mailto:[email protected]|[email protected]>:dev-team/[email protected]#egg=pp_saturn``` &lt;= this make the pip freeze look very ugly ```pip freeze -e <mailto:[email protected]|[email protected]>:dev-team/pp_saturn.git@d99adff288fb1da46513f19de71069eeb334fa76#egg=pp_saturn-origin_HEAD ``` But if I do ```pip install <git+ssh://[email protected]/dev-team/[email protected]#egg=pp_saturn>``` the result look better when pip freeze ```pip install <git+ssh://[email protected]/dev-team/[email protected]#egg=pp_saturn> Collecting pp_saturn from <git+ssh://[email protected]/dev-team/[email protected]#egg=pp_saturn> Cloning <ssh://[email protected]/dev-team/pp_saturn.git> (to v0.1.1) to /private/var/folders/th/j986b2qj7yn_zczrbmf95jgw0000gn/T/pip-build-Dt_riZ/pp-saturn Installing collected packages: pp-saturn Running setup.py install for pp-saturn ... done Successfully installed pp-saturn-0.1.3b0``` So I should follow the latter way right? Anyway, i’m build the docker image that will later use this package. I need to add a private key into the docker image, so that I can have the access to repo inside the container, any other way to do that? Thanks
2017-08-02T04:25:24.912432
Hermina
pythondev_help_Hermina_2017-08-02T04:25:24.912432
1,501,647,924.912432
88,465
pythondev
help
Hey, does anyone know the effect on performance for importing similar libraries in self-defined classes that utilize each other? Context: working on a machine learning project and really want to segment out certain functionality into different classes for maintainability purposes, but certain libraries take a while to load, and I don’t want to have to load them each more than once. Any advice?
2017-08-02T04:39:02.221507
Denny
pythondev_help_Denny_2017-08-02T04:39:02.221507
1,501,648,742.221507
88,466
pythondev
help
<@Denny> in python, import machinery ensures you have a single copy of each imported library
2017-08-02T04:41:38.281027
Collette
pythondev_help_Collette_2017-08-02T04:41:38.281027
1,501,648,898.281027
88,467
pythondev
help
It caches imported modules, so the first import is slow but subsequent imports are fast
2017-08-02T04:42:01.289477
Collette
pythondev_help_Collette_2017-08-02T04:42:01.289477
1,501,648,921.289477
88,468
pythondev
help
thanks <@Collette>! That’s what I was hoping to hear!
2017-08-02T04:44:21.342950
Denny
pythondev_help_Denny_2017-08-02T04:44:21.342950
1,501,649,061.34295
88,469
pythondev
help
Is this related to the other ansible work you mentioned yesterday? If so - check out file templating with jinja2
2017-08-02T09:05:31.008655
Beula
pythondev_help_Beula_2017-08-02T09:05:31.008655
1,501,664,731.008655
88,470
pythondev
help
I think you can do basic style auth, but obviously using a key is typically preferable - so I think there's not a better way to do that.
2017-08-02T09:13:51.259432
Beula
pythondev_help_Beula_2017-08-02T09:13:51.259432
1,501,665,231.259432
88,471
pythondev
help
hey guys, is it a bad manner to post a stackoverflow link to my question in here?
2017-08-02T09:48:14.440515
Corrine
pythondev_help_Corrine_2017-08-02T09:48:14.440515
1,501,667,294.440515
88,472
pythondev
help
don’t want to spam with a bunch of lines of code and text…
2017-08-02T09:48:32.451575
Corrine
pythondev_help_Corrine_2017-08-02T09:48:32.451575
1,501,667,312.451575
88,473
pythondev
help
will try my luck <https://stackoverflow.com/questions/45462719/cannot-add-a-new-user-to-users-table-in-postgresql-using-sqlalchemy-after-switch>
2017-08-02T10:00:21.892308
Corrine
pythondev_help_Corrine_2017-08-02T10:00:21.892308
1,501,668,021.892308
88,474
pythondev
help
What's the form look like <@Corrine>
2017-08-02T10:02:52.991906
Beula
pythondev_help_Beula_2017-08-02T10:02:52.991906
1,501,668,172.991906
88,475
pythondev
help
hey <@Beula> thnx for your response
2017-08-02T10:07:04.156129
Corrine
pythondev_help_Corrine_2017-08-02T10:07:04.156129
1,501,668,424.156129
88,476
pythondev
help
class RegisterForm(FlaskForm): username = StringField(‘username’, validators=[InputRequired(), Length(min=4, max=15)]) password = StringField(‘password’, validators=[InputRequired(), Length(min=8, max=80)]) email = StringField(‘email’, validators=[InputRequired(), Email(message=‘Invalid Email’), Length(max=50)])
2017-08-02T10:07:14.162913
Corrine
pythondev_help_Corrine_2017-08-02T10:07:14.162913
1,501,668,434.162913
88,477
pythondev
help
Can you show the definition of your users table?
2017-08-02T10:12:22.358224
Suellen
pythondev_help_Suellen_2017-08-02T10:12:22.358224
1,501,668,742.358224
88,478
pythondev
help
`\d+ users`?
2017-08-02T10:12:23.359103
Suellen
pythondev_help_Suellen_2017-08-02T10:12:23.359103
1,501,668,743.359103
88,479
pythondev
help
SQLAlchemy tries to insert a `NULL` into a primary key column, which is a way to say that an autoincrement value should be used. But it doesn't work with Postgres and SQLAlchemy should know that.
2017-08-02T10:14:03.423176
Suellen
pythondev_help_Suellen_2017-08-02T10:14:03.423176
1,501,668,843.423176
88,480
pythondev
help
1sec
2017-08-02T10:15:46.489945
Corrine
pythondev_help_Corrine_2017-08-02T10:15:46.489945
1,501,668,946.489945
88,481
pythondev
help
Column | Type | Modifiers | Storage | Stats target | Description ----------+-----------------------+-----------+----------+--------------+------------- id | integer | not null | plain | | username | character varying(15) | | extended | | email | character varying(50) | | extended | | password | character varying(80) | | extended | | Indexes: “users_pkey” PRIMARY KEY, btree (id) “users_email_key” UNIQUE CONSTRAINT, btree (email) “users_username_key” UNIQUE CONSTRAINT, btree (username)
2017-08-02T10:17:12.544787
Corrine
pythondev_help_Corrine_2017-08-02T10:17:12.544787
1,501,669,032.544787
88,482
pythondev
help
``` Column: id Type: integer Modifiers: not null default nextval('users_id_seq'::regclass)```
2017-08-02T10:20:05.657127
Suellen
pythondev_help_Suellen_2017-08-02T10:20:05.657127
1,501,669,205.657127
88,483
pythondev
help
thanks:)
2017-08-02T10:20:13.662126
Hermina
pythondev_help_Hermina_2017-08-02T10:20:13.662126
1,501,669,213.662126
88,484
pythondev
help
that's what an `id` column should look like ideally
2017-08-02T10:21:01.694118
Suellen
pythondev_help_Suellen_2017-08-02T10:21:01.694118
1,501,669,261.694118
88,485
pythondev
help
i.e. a SERIAL type should've beed used, and not just a not-null integer
2017-08-02T10:22:49.765921
Suellen
pythondev_help_Suellen_2017-08-02T10:22:49.765921
1,501,669,369.765921
88,486
pythondev
help
strange overall, is your sqlalchemy up-to-date?
2017-08-02T10:23:25.788955
Suellen
pythondev_help_Suellen_2017-08-02T10:23:25.788955
1,501,669,405.788955
88,487
pythondev
help
yeap it is
2017-08-02T10:23:34.795218
Corrine
pythondev_help_Corrine_2017-08-02T10:23:34.795218
1,501,669,414.795218
88,488
pythondev
help
Flask-SQLAlchemy==2.2
2017-08-02T10:24:10.819126
Corrine
pythondev_help_Corrine_2017-08-02T10:24:10.819126
1,501,669,450.819126
88,489
pythondev
help
How did you move over from sqlite? Did you migrate data, or start fresh?
2017-08-02T10:24:10.819326
Beula
pythondev_help_Beula_2017-08-02T10:24:10.819326
1,501,669,450.819326
88,490
pythondev
help
tried to migrate, had to start fresh
2017-08-02T10:24:32.833510
Corrine
pythondev_help_Corrine_2017-08-02T10:24:32.833510
1,501,669,472.83351
88,491
pythondev
help
couldn’t figure out
2017-08-02T10:24:36.835812
Corrine
pythondev_help_Corrine_2017-08-02T10:24:36.835812
1,501,669,476.835812
88,492
pythondev
help
a convenient way to migrate …
2017-08-02T10:24:43.840960
Corrine
pythondev_help_Corrine_2017-08-02T10:24:43.840960
1,501,669,483.84096
88,493
pythondev
help
It's not easy usually
2017-08-02T10:27:35.956392
Beula
pythondev_help_Beula_2017-08-02T10:27:35.956392
1,501,669,655.956392
88,494
pythondev
help
aha
2017-08-02T10:30:45.085493
Corrine
pythondev_help_Corrine_2017-08-02T10:30:45.085493
1,501,669,845.085493
88,495
pythondev
help
``` In [1]: db Out[1]: &lt;SQLAlchemy engine=postgresql://postgres:***@127.0.0.1/postgres&gt; In [2]: User.create(username='abc', email='<mailto:[email protected]|[email protected]>') Out[2]: &lt;User 1&gt; ```
2017-08-02T10:32:26.153488
Suellen
pythondev_help_Suellen_2017-08-02T10:32:26.153488
1,501,669,946.153488
88,496
pythondev
help
my User model has the following: ``` id = db.Column(db.Integer, primary_key=True) ```
2017-08-02T10:32:47.167466
Suellen
pythondev_help_Suellen_2017-08-02T10:32:47.167466
1,501,669,967.167466
88,497
pythondev
help
and that's it
2017-08-02T10:32:49.169083
Suellen
pythondev_help_Suellen_2017-08-02T10:32:49.169083
1,501,669,969.169083
88,498
pythondev
help
sqla creates a SERIAL column that way, not just a non-nullable integer
2017-08-02T10:33:23.192042
Suellen
pythondev_help_Suellen_2017-08-02T10:33:23.192042
1,501,670,003.192042
88,499
pythondev
help
maybe migrations are to blame?
2017-08-02T10:34:33.238805
Suellen
pythondev_help_Suellen_2017-08-02T10:34:33.238805
1,501,670,073.238805
88,500
pythondev
help
may be
2017-08-02T10:46:34.716644
Corrine
pythondev_help_Corrine_2017-08-02T10:46:34.716644
1,501,670,794.716644
88,501
pythondev
help
well do you use migrations? have you used them to create tables in postgres?
2017-08-02T10:47:06.738366
Suellen
pythondev_help_Suellen_2017-08-02T10:47:06.738366
1,501,670,826.738366
88,502