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 | Hello, I'm trying to store recurring events in a database. I originally wanted to use django-recurrence by just storing the rule. However, I'm not too sure if this would be optimal when querying all the objects for specific dates (especially at a large scale).
Is it better to store the recurring events as single occurrences? | 2019-04-07T18:33:11.774300 | Russel | pythondev_help_Russel_2019-04-07T18:33:11.774300 | 1,554,661,991.7743 | 17,421 |
pythondev | help | What are u trying to clean? Are you trying to just trim the values that have trailing spaces | 2019-04-07T19:22:59.774500 | Sparkle | pythondev_help_Sparkle_2019-04-07T19:22:59.774500 | 1,554,664,979.7745 | 17,422 |
pythondev | help | An example with before and after would be most helpful | 2019-04-07T19:24:45.774700 | Sparkle | pythondev_help_Sparkle_2019-04-07T19:24:45.774700 | 1,554,665,085.7747 | 17,423 |
pythondev | help | This is exactly what I needed, for future reference, <@Sasha> <@Hiroko> : <https://nitratine.net/blog/post/encryption-and-decryption-in-python/> | 2019-04-07T20:47:55.776700 | Velva | pythondev_help_Velva_2019-04-07T20:47:55.776700 | 1,554,670,075.7767 | 17,424 |
pythondev | help | See ‘generating key from password.’ I’m using an “application password” which is used to enc/dec the stored passwords. The stored passwords are made using Fernet (AES) and the application password. | 2019-04-07T20:51:27.779100 | Velva | pythondev_help_Velva_2019-04-07T20:51:27.779100 | 1,554,670,287.7791 | 17,425 |
pythondev | help | Cool, that looks like a good method. | 2019-04-07T20:58:25.779500 | Sasha | pythondev_help_Sasha_2019-04-07T20:58:25.779500 | 1,554,670,705.7795 | 17,426 |
pythondev | help | if I pass a list to a function, and in that function I pop a row out of the list, do I also remove that row from the version of the list in the calling function? | 2019-04-08T01:11:18.780500 | Chuck | pythondev_help_Chuck_2019-04-08T01:11:18.780500 | 1,554,685,878.7805 | 17,427 |
pythondev | help | i guess i'm asking if lists are passed by ref or by value, aren't i... | 2019-04-08T01:11:51.780900 | Chuck | pythondev_help_Chuck_2019-04-08T01:11:51.780900 | 1,554,685,911.7809 | 17,428 |
pythondev | help | And I have my answer... by ref... cool, I can work around that. | 2019-04-08T01:14:41.781400 | Chuck | pythondev_help_Chuck_2019-04-08T01:14:41.781400 | 1,554,686,081.7814 | 17,429 |
pythondev | help | Yep, basically everything is passed by reference, but some types are immutable. | 2019-04-08T01:17:45.781900 | Sasha | pythondev_help_Sasha_2019-04-08T01:17:45.781900 | 1,554,686,265.7819 | 17,430 |
pythondev | help | Why this code is not returning true or false | 2019-04-08T01:40:34.782500 | Monet | pythondev_help_Monet_2019-04-08T01:40:34.782500 | 1,554,687,634.7825 | 17,431 |
pythondev | help | None | 2019-04-08T01:40:34.782600 | Monet | pythondev_help_Monet_2019-04-08T01:40:34.782600 | 1,554,687,634.7826 | 17,432 |
pythondev | help | is it not returning atall? | 2019-04-08T02:05:13.783000 | Leida | pythondev_help_Leida_2019-04-08T02:05:13.783000 | 1,554,689,113.783 | 17,433 |
pythondev | help | what is it returning? | 2019-04-08T02:05:17.783200 | Leida | pythondev_help_Leida_2019-04-08T02:05:17.783200 | 1,554,689,117.7832 | 17,434 |
pythondev | help | and what are your inputs? | 2019-04-08T02:10:03.783400 | Leida | pythondev_help_Leida_2019-04-08T02:10:03.783400 | 1,554,689,403.7834 | 17,435 |
pythondev | help | When you call the function recursively, you need to `return` its result. | 2019-04-08T02:17:42.784700 | Sasha | pythondev_help_Sasha_2019-04-08T02:17:42.784700 | 1,554,689,862.7847 | 17,436 |
pythondev | help | looks like logging as changed and your configuration is not appropriate | 2019-04-08T04:47:59.786700 | Jimmy | pythondev_help_Jimmy_2019-04-08T04:47:59.786700 | 1,554,698,879.7867 | 17,437 |
pythondev | help | `logging_config_func(LOGGING)` <- what's in `LOGGING` ? | 2019-04-08T04:48:15.787000 | Jimmy | pythondev_help_Jimmy_2019-04-08T04:48:15.787000 | 1,554,698,895.787 | 17,438 |
pythondev | help | This message was deleted. | 2019-04-08T04:59:34.787900 | Alejandrina | pythondev_help_Alejandrina_2019-04-08T04:59:34.787900 | 1,554,699,574.7879 | 17,439 |
pythondev | help | Ok so I have a few hundred csv files I need to work with, that have a bit messed up structure. The header looks like this
```Address Amount Last deposit block Last deposit timestamp Last withdrawal block Last withdrawal timestamp```
And the data is separated by commas like this:
```"NQd9pW2TZq9Eiemtb,5110061149.38249,407355,2018-04-30 03:17:25,407357,2018-04-30 03:24:43"
``` | 2019-04-08T05:09:04.790800 | Conchita | pythondev_help_Conchita_2019-04-08T05:09:04.790800 | 1,554,700,144.7908 | 17,440 |
pythondev | help | I'm a bit confused on how to solve this as a column can be `Last deposit block` so I can't really use spaces as a delimiter | 2019-04-08T05:09:50.791500 | Conchita | pythondev_help_Conchita_2019-04-08T05:09:50.791500 | 1,554,700,190.7915 | 17,441 |
pythondev | help | something in your logging configuration is not supported in 3.7 I guess | 2019-04-08T05:11:11.792200 | Jimmy | pythondev_help_Jimmy_2019-04-08T05:11:11.792200 | 1,554,700,271.7922 | 17,442 |
pythondev | help | looks like tab is the header delimiter | 2019-04-08T05:11:27.792600 | Jimmy | pythondev_help_Jimmy_2019-04-08T05:11:27.792600 | 1,554,700,287.7926 | 17,443 |
pythondev | help | Yeah that could be. When I run the following, I get the whole row of data though;
```with open(csv_path, 'r') as csv_file:
csv_reader = csv.reader(csv_file, delimiter='\t')
next(csv_reader, None)
for row in csv_reader:
for char in ",":
address = row[0]
print(address)``` | 2019-04-08T05:14:38.793900 | Conchita | pythondev_help_Conchita_2019-04-08T05:14:38.793900 | 1,554,700,478.7939 | 17,444 |
pythondev | help | Where I would expect to get only `NQd9pW2TZq9Eiemtb` contrary to the whole row | 2019-04-08T05:15:11.794900 | Conchita | pythondev_help_Conchita_2019-04-08T05:15:11.794900 | 1,554,700,511.7949 | 17,445 |
pythondev | help | I'm not super familiar with `csv.reader ` but there might be a way to have a separate delimiter for the headers vs the rows | 2019-04-08T05:15:32.795700 | Jimmy | pythondev_help_Jimmy_2019-04-08T05:15:32.795700 | 1,554,700,532.7957 | 17,446 |
pythondev | help | I doubt it but maybe | 2019-04-08T05:15:39.796100 | Jimmy | pythondev_help_Jimmy_2019-04-08T05:15:39.796100 | 1,554,700,539.7961 | 17,447 |
pythondev | help | Yeah, the data is comma seperated, only first row has tab delimited columns from what i can see | 2019-04-08T05:15:41.796300 | Linda | pythondev_help_Linda_2019-04-08T05:15:41.796300 | 1,554,700,541.7963 | 17,448 |
pythondev | help | or parse the header and data separately | 2019-04-08T05:16:30.796700 | Jimmy | pythondev_help_Jimmy_2019-04-08T05:16:30.796700 | 1,554,700,590.7967 | 17,449 |
pythondev | help | Can I skip the header and just parse the data? | 2019-04-08T05:18:30.797100 | Conchita | pythondev_help_Conchita_2019-04-08T05:18:30.797100 | 1,554,700,710.7971 | 17,450 |
pythondev | help | I don't need the column names for any purpose | 2019-04-08T05:18:44.797500 | Conchita | pythondev_help_Conchita_2019-04-08T05:18:44.797500 | 1,554,700,724.7975 | 17,451 |
pythondev | help | pretty sure you can. look at the doc :slightly_smiling_face: | 2019-04-08T05:18:55.797900 | Jimmy | pythondev_help_Jimmy_2019-04-08T05:18:55.797900 | 1,554,700,735.7979 | 17,452 |
pythondev | help | Will do! | 2019-04-08T05:19:02.798100 | Conchita | pythondev_help_Conchita_2019-04-08T05:19:02.798100 | 1,554,700,742.7981 | 17,453 |
pythondev | help | I'm installing `graphsim` and it did installed but when I make import it gives me ```ModuleNotFoundError: No module named 'graphsim'``` | 2019-04-08T07:49:08.799800 | Tanja | pythondev_help_Tanja_2019-04-08T07:49:08.799800 | 1,554,709,748.7998 | 17,454 |
pythondev | help | how did you install the package and how are you running you code/application? | 2019-04-08T07:57:25.800100 | Mica | pythondev_help_Mica_2019-04-08T07:57:25.800100 | 1,554,710,245.8001 | 17,455 |
pythondev | help | ` sudo pip install -U graphsim` and the last time it gives: ``` Requirement already up-to-date: graphsim in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: networkx==1.11 in /usr/local/lib/python2.7/dist-packages (from graphsim)
Requirement already up-to-date: numpy>=1.13 in ./.local/lib/python2.7/site-packages (from graphsim)
Requirement already up-to-date: typedecorator>=0.0.4 in /usr/local/lib/python2.7/dist-packages (from graphsim)
Requirement already up-to-date: decorator>=3.4.0 in /usr/local/lib/python2.7/dist-packages (from networkx==1.11->graphsim)
``` I'm running the code through file, also I checked it using the terminal directly, but the same result | 2019-04-08T07:59:13.801200 | Tanja | pythondev_help_Tanja_2019-04-08T07:59:13.801200 | 1,554,710,353.8012 | 17,456 |
pythondev | help | through file I mean, I did the import in the file and run the file from terminal | 2019-04-08T07:59:46.801800 | Tanja | pythondev_help_Tanja_2019-04-08T07:59:46.801800 | 1,554,710,386.8018 | 17,457 |
pythondev | help | you shouldn't really be installing packages using `sudo`, also what do you mean by "running the code through file" | 2019-04-08T08:00:38.802400 | Mica | pythondev_help_Mica_2019-04-08T08:00:38.802400 | 1,554,710,438.8024 | 17,458 |
pythondev | help | are you doing `python file.py` | 2019-04-08T08:00:56.802900 | Mica | pythondev_help_Mica_2019-04-08T08:00:56.802900 | 1,554,710,456.8029 | 17,459 |
pythondev | help | I tried both installation with sudo and without it... Yes I'm running it that way | 2019-04-08T08:01:44.803600 | Tanja | pythondev_help_Tanja_2019-04-08T08:01:44.803600 | 1,554,710,504.8036 | 17,460 |
pythondev | help | Don't ever install them with Sudo | 2019-04-08T08:02:14.804300 | Jonas | pythondev_help_Jonas_2019-04-08T08:02:14.804300 | 1,554,710,534.8043 | 17,461 |
pythondev | help | :point_up: | 2019-04-08T08:02:17.804600 | Hiroko | pythondev_help_Hiroko_2019-04-08T08:02:17.804600 | 1,554,710,537.8046 | 17,462 |
pythondev | help | Use a virtual environment | 2019-04-08T08:02:19.804700 | Jonas | pythondev_help_Jonas_2019-04-08T08:02:19.804700 | 1,554,710,539.8047 | 17,463 |
pythondev | help | `python3 -mvenv your_directory/` | 2019-04-08T08:02:26.805100 | Jonas | pythondev_help_Jonas_2019-04-08T08:02:26.805100 | 1,554,710,546.8051 | 17,464 |
pythondev | help | what does `python --version` produce | 2019-04-08T08:02:35.805500 | Mica | pythondev_help_Mica_2019-04-08T08:02:35.805500 | 1,554,710,555.8055 | 17,465 |
pythondev | help | `source your_directory/bin/activate`, then run `pip install xyz` | 2019-04-08T08:02:43.805800 | Jonas | pythondev_help_Jonas_2019-04-08T08:02:43.805800 | 1,554,710,563.8058 | 17,466 |
pythondev | help | is it python2.7? | 2019-04-08T08:02:43.805900 | Mica | pythondev_help_Mica_2019-04-08T08:02:43.805900 | 1,554,710,563.8059 | 17,467 |
pythondev | help | Please use Python3 unless someone has specifically told you to use 2 | 2019-04-08T08:03:00.806500 | Jonas | pythondev_help_Jonas_2019-04-08T08:03:00.806500 | 1,554,710,580.8065 | 17,468 |
pythondev | help | <https://realpython.com/python-virtual-environments-a-primer/> | 2019-04-08T08:03:09.806900 | Mica | pythondev_help_Mica_2019-04-08T08:03:09.806900 | 1,554,710,589.8069 | 17,469 |
pythondev | help | `Python 3.7.1` | 2019-04-08T08:03:13.807100 | Tanja | pythondev_help_Tanja_2019-04-08T08:03:13.807100 | 1,554,710,593.8071 | 17,470 |
pythondev | help | ok | 2019-04-08T08:03:16.807300 | Mica | pythondev_help_Mica_2019-04-08T08:03:16.807300 | 1,554,710,596.8073 | 17,471 |
pythondev | help | so the package installed is not installed for python3 | 2019-04-08T08:03:27.807800 | Mica | pythondev_help_Mica_2019-04-08T08:03:27.807800 | 1,554,710,607.8078 | 17,472 |
pythondev | help | you've installed the package for 2 and are trying to run the file using 3 | 2019-04-08T08:03:42.808200 | Mica | pythondev_help_Mica_2019-04-08T08:03:42.808200 | 1,554,710,622.8082 | 17,473 |
pythondev | help | Also I second <@Jonas>, def use a virtual venv of some kind, they're basically a requirement for any sort of development, and they'll prevent stuff like this! :slightly_smiling_face: | 2019-04-08T08:04:32.809100 | Mica | pythondev_help_Mica_2019-04-08T08:04:32.809100 | 1,554,710,672.8091 | 17,474 |
pythondev | help | They will also prevent you from completely breaking your system | 2019-04-08T08:05:00.809600 | Jonas | pythondev_help_Jonas_2019-04-08T08:05:00.809600 | 1,554,710,700.8096 | 17,475 |
pythondev | help | when you run `sudo pip install ....` | 2019-04-08T08:05:10.810100 | Jonas | pythondev_help_Jonas_2019-04-08T08:05:10.810100 | 1,554,710,710.8101 | 17,476 |
pythondev | help | so what should be done to solve such problem | 2019-04-08T08:05:17.810300 | Tanja | pythondev_help_Tanja_2019-04-08T08:05:17.810300 | 1,554,710,717.8103 | 17,477 |
pythondev | help | So it's not that you may want to use them, you have to use them. | 2019-04-08T08:05:26.810600 | Jonas | pythondev_help_Jonas_2019-04-08T08:05:26.810600 | 1,554,710,726.8106 | 17,478 |
pythondev | help | Look at what <@Mica> posted above. | 2019-04-08T08:05:39.810900 | Jonas | pythondev_help_Jonas_2019-04-08T08:05:39.810900 | 1,554,710,739.8109 | 17,479 |
pythondev | help | Give it a read and ask us any questions here. | 2019-04-08T08:05:46.811200 | Jonas | pythondev_help_Jonas_2019-04-08T08:05:46.811200 | 1,554,710,746.8112 | 17,480 |
pythondev | help | <https://docs.python-guide.org/dev/virtualenvs/> | 2019-04-08T08:06:20.811700 | Jonas | pythondev_help_Jonas_2019-04-08T08:06:20.811700 | 1,554,710,780.8117 | 17,481 |
pythondev | help | or this can help <@Tanja> | 2019-04-08T08:06:25.811900 | Jonas | pythondev_help_Jonas_2019-04-08T08:06:25.811900 | 1,554,710,785.8119 | 17,482 |
pythondev | help | excuse my stupid question :see_no_evil: would this mean, I should after installing the Virtual Environments,when creating a project reinstall the libraries I did before, like for example netwrokx, pymesh.. The idea was not completely clear for me :disappointed: I'm a beginner -_- | 2019-04-08T08:13:16.814100 | Tanja | pythondev_help_Tanja_2019-04-08T08:13:16.814100 | 1,554,711,196.8141 | 17,483 |
pythondev | help | <@Tanja> are you making a new project or installing someone elses | 2019-04-08T08:13:52.814400 | Jonas | pythondev_help_Jonas_2019-04-08T08:13:52.814400 | 1,554,711,232.8144 | 17,484 |
pythondev | help | I would highly, highly recommend using Pipenv if you are a beginner | 2019-04-08T08:14:02.814700 | Jonas | pythondev_help_Jonas_2019-04-08T08:14:02.814700 | 1,554,711,242.8147 | 17,485 |
pythondev | help | <https://pipenv.readthedocs.io/en/latest/install/#installing-pipenv> | 2019-04-08T08:14:18.815100 | Jonas | pythondev_help_Jonas_2019-04-08T08:14:18.815100 | 1,554,711,258.8151 | 17,486 |
pythondev | help | I'm making my own coding using the work of others( PyMesh, NetworkX...) | 2019-04-08T08:14:43.816000 | Tanja | pythondev_help_Tanja_2019-04-08T08:14:43.816000 | 1,554,711,283.816 | 17,487 |
pythondev | help | Ok, so I would go with Pipenv. It's not perfect, as people may attest to here, but it will let you move on | 2019-04-08T08:15:04.816400 | Jonas | pythondev_help_Jonas_2019-04-08T08:15:04.816400 | 1,554,711,304.8164 | 17,488 |
pythondev | help | Follow the guide I linked above | 2019-04-08T08:15:10.816600 | Jonas | pythondev_help_Jonas_2019-04-08T08:15:10.816600 | 1,554,711,310.8166 | 17,489 |
pythondev | help | And see the `Installing packages for your project` bit afterwards. | 2019-04-08T08:15:26.816900 | Jonas | pythondev_help_Jonas_2019-04-08T08:15:26.816900 | 1,554,711,326.8169 | 17,490 |
pythondev | help | Ok, I really appreciate your help | 2019-04-08T08:17:24.817300 | Tanja | pythondev_help_Tanja_2019-04-08T08:17:24.817300 | 1,554,711,444.8173 | 17,491 |
pythondev | help | <@Jonas> :taco: | 2019-04-08T08:17:40.817500 | Mica | pythondev_help_Mica_2019-04-08T08:17:40.817500 | 1,554,711,460.8175 | 17,492 |
pythondev | help | ```collections = [1, 2]
domains = ['indexer, 'app-01', 'app-02']```
How can I merge these in one list efficiently to a format like
`[('indexer', 1), ('indexer', 2), ('app-01', 1), (...), ...]` | 2019-04-08T09:33:01.819700 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:33:01.819700 | 1,554,715,981.8197 | 17,493 |
pythondev | help | I can do it with
```In [7]: keys = []
In [8]: for domain in domains:
...: for collection in collections:
...: keys.append((domain, collection))
``` | 2019-04-08T09:33:07.820000 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:33:07.820000 | 1,554,715,987.82 | 17,494 |
pythondev | help | but is there a better pythonic way? | 2019-04-08T09:33:18.820500 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:33:18.820500 | 1,554,715,998.8205 | 17,495 |
pythondev | help | `zip` and `itertools.izip_longest` really don’t fit the case here | 2019-04-08T09:33:52.821100 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:33:52.821100 | 1,554,716,032.8211 | 17,496 |
pythondev | help | `itertools.cycle` on `collections`, along with `zip`? | 2019-04-08T09:36:37.822600 | Clemmie | pythondev_help_Clemmie_2019-04-08T09:36:37.822600 | 1,554,716,197.8226 | 17,497 |
pythondev | help | Does the ordering matter, or just the content? | 2019-04-08T09:36:58.823000 | Carmen | pythondev_help_Carmen_2019-04-08T09:36:58.823000 | 1,554,716,218.823 | 17,498 |
pythondev | help | ohhh - misread | 2019-04-08T09:37:23.823500 | Clemmie | pythondev_help_Clemmie_2019-04-08T09:37:23.823500 | 1,554,716,243.8235 | 17,499 |
pythondev | help | <@Carmen> ordering really doesn’t matter | 2019-04-08T09:37:48.824200 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:37:48.824200 | 1,554,716,268.8242 | 17,500 |
pythondev | help | it can be either. The tuples will be going into a string template for concurrent requests | 2019-04-08T09:38:08.825200 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:38:08.825200 | 1,554,716,288.8252 | 17,501 |
pythondev | help | tl;dr need to rebuild Solr’s Suggest index periodically, and its separate from the primary index | 2019-04-08T09:38:43.826700 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:38:43.826700 | 1,554,716,323.8267 | 17,502 |
pythondev | help | `itertools.product` I think, now that I read it again | 2019-04-08T09:38:44.826800 | Clemmie | pythondev_help_Clemmie_2019-04-08T09:38:44.826800 | 1,554,716,324.8268 | 17,503 |
pythondev | help | I would think you could use a nested list comprehension to do the trick. `[(d, c) for c in collections for d in domains]` | 2019-04-08T09:38:50.827100 | Carmen | pythondev_help_Carmen_2019-04-08T09:38:50.827100 | 1,554,716,330.8271 | 17,504 |
pythondev | help | itertools product or permutations should do it | 2019-04-08T09:39:34.828100 | Jonas | pythondev_help_Jonas_2019-04-08T09:39:34.828100 | 1,554,716,374.8281 | 17,505 |
pythondev | help | you want <https://docs.python.org/3/library/itertools.html#itertools.product> in this case I think | 2019-04-08T09:39:57.828600 | Jonas | pythondev_help_Jonas_2019-04-08T09:39:57.828600 | 1,554,716,397.8286 | 17,506 |
pythondev | help | ```list(itertools.product(domains, [1, 2]))``` | 2019-04-08T09:40:28.828800 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:40:28.828800 | 1,554,716,428.8288 | 17,507 |
pythondev | help | did the trick, thanks! | 2019-04-08T09:40:33.829000 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:40:33.829000 | 1,554,716,433.829 | 17,508 |
pythondev | help | :+1: | 2019-04-08T09:40:45.829400 | Carmen | pythondev_help_Carmen_2019-04-08T09:40:45.829400 | 1,554,716,445.8294 | 17,509 |
pythondev | help | <@Jonas> <@Clemmie> <@Carmen> :taco: | 2019-04-08T09:41:10.830100 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:41:10.830100 | 1,554,716,470.8301 | 17,510 |
pythondev | help | enjoy breakfast :slightly_smiling_face: | 2019-04-08T09:41:17.830400 | Hiroko | pythondev_help_Hiroko_2019-04-08T09:41:17.830400 | 1,554,716,477.8304 | 17,511 |
pythondev | help | ...Oh my neg, they gamified the Taco system. | 2019-04-08T09:41:50.831200 | Carmen | pythondev_help_Carmen_2019-04-08T09:41:50.831200 | 1,554,716,510.8312 | 17,512 |
pythondev | help | Screw wheaties (or even little chocolate donuts) - :taco:’s are the breakfast of champions | 2019-04-08T09:42:25.831800 | Clemmie | pythondev_help_Clemmie_2019-04-08T09:42:25.831800 | 1,554,716,545.8318 | 17,513 |
pythondev | help | Homemade blueberry muffins won out this time, but I'd absolutely take a taco over my usual pop-tart. | 2019-04-08T09:42:55.832400 | Carmen | pythondev_help_Carmen_2019-04-08T09:42:55.832400 | 1,554,716,575.8324 | 17,514 |
pythondev | help | Hi, it's me again. A quick question - I have a page in which I creates a token for a user. I want to trigger a user logged in signal but cannot find the way to do it from the documentation | 2019-04-08T09:44:09.833300 | Rayford | pythondev_help_Rayford_2019-04-08T09:44:09.833300 | 1,554,716,649.8333 | 17,515 |
pythondev | help | ```
from django.contrib.auth import user_logged_in
user_logged_in.connect(request=request, user=user)
```
But this won't work | 2019-04-08T09:44:43.833700 | Rayford | pythondev_help_Rayford_2019-04-08T09:44:43.833700 | 1,554,716,683.8337 | 17,516 |
pythondev | help | <@Rayford> you don’t need to trigger the signal, it happens when a user logs in. You need to connect a callback function to receive the signal. connect is an ok way to do it, but most people lean towards the decorator like so | 2019-04-08T09:57:36.836200 | Clemmie | pythondev_help_Clemmie_2019-04-08T09:57:36.836200 | 1,554,717,456.8362 | 17,517 |
pythondev | help | No, But I don't want receive an event. I'm creating a token manually(legacy code) and I want to trigger the user login event | 2019-04-08T09:58:57.837300 | Rayford | pythondev_help_Rayford_2019-04-08T09:58:57.837300 | 1,554,717,537.8373 | 17,518 |
pythondev | help | That's why I don't need to listen to that event | 2019-04-08T09:59:20.837600 | Rayford | pythondev_help_Rayford_2019-04-08T09:59:20.837600 | 1,554,717,560.8376 | 17,519 |
pythondev | help | ohhh | 2019-04-08T10:01:31.837800 | Clemmie | pythondev_help_Clemmie_2019-04-08T10:01:31.837800 | 1,554,717,691.8378 | 17,520 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.