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 | Hi all. I came to know about the usage of filter along with lambda function in Python. Just like the the following
```d = {'a': None, 'b': 'myname', 'c': 122}
print dict(filter(lambda x:x[1], d.items()))
{'b': 'myname', 'c': 122}```. The result is `a` get popped. That’s what actually I need. Here I couldn’t figure out what does x:x[1] stands for. It would be great if someone explain me what is exactly happening. Thanks in advance. | 2017-09-25T10:28:57.000252 | Cleotilde | pythondev_help_Cleotilde_2017-09-25T10:28:57.000252 | 1,506,335,337.000252 | 94,603 |
pythondev | help | <@Cleotilde> lambda is pretty much the same as ```
def to_filter(x):
return bool(x[1])
``` | 2017-09-25T10:30:29.000036 | Collette | pythondev_help_Collette_2017-09-25T10:30:29.000036 | 1,506,335,429.000036 | 94,604 |
pythondev | help | Okay. | 2017-09-25T10:31:01.000400 | Cleotilde | pythondev_help_Cleotilde_2017-09-25T10:31:01.000400 | 1,506,335,461.0004 | 94,605 |
pythondev | help | The items method of dictionary (<https://docs.python.org/3/library/stdtypes.html?highlight=items#dict.items>) returns a list of tuples in the form of (key, value), the lambda function is called on each tuple, and the [1] notation refers to the second element in the tuple which is the value in the dictionary | 2017-09-25T10:31:54.000538 | Antionette | pythondev_help_Antionette_2017-09-25T10:31:54.000538 | 1,506,335,514.000538 | 94,606 |
pythondev | help | so in this case if the value is falsy it gets filtered out | 2017-09-25T10:32:23.000052 | Antionette | pythondev_help_Antionette_2017-09-25T10:32:23.000052 | 1,506,335,543.000052 | 94,607 |
pythondev | help | Okay. Thank you very much <@Antionette>. | 2017-09-25T10:32:59.000423 | Cleotilde | pythondev_help_Cleotilde_2017-09-25T10:32:59.000423 | 1,506,335,579.000423 | 94,608 |
pythondev | help | hello, I am trying to implement `pivot`, consider this scenario. Given a dataframe df with schema as `id, url, type, val`. I wish to convert it into a dataframe with schema as `id, url, type1, type2, type3, ...` where each column value in `type_i` is dervied from the `val` | 2017-09-25T13:35:37.000183 | Tameika | pythondev_help_Tameika_2017-09-25T13:35:37.000183 | 1,506,346,537.000183 | 94,609 |
pythondev | help | anyone here with bulk indexing in solr experience? I have a project coming up in which I have to index about 10 million web pages on S3 as well as an continual average of 20k or so per week. Objects in the celery bucket are like `/bucket_name/$db_id/path/to/file.ext`
Distributor task - take in a folder ID and get all html files from the folder, recursively
Single-page index task - Responsible for indexing one single web page, started from parent task above
Using Celery, my workflow is like this:
1. Query db for IDs of records and chunk to distributor celery task
2. Celery task uses `boto3` to get all html files from the S3 `bucket_name/db_id` 'folder' Puts path in queue for single-page index task
3. Individual page processes and inserts into mysql db table
4. Once all child tasks are finished, parent task triggers a Solr DataImportHandler API call to do a delta-import from the mysql table, which should import all the recently inserted data from mysql into solr
5. After import is complete, delete all imported rows from mysql table | 2017-09-25T16:08:39.000453 | Meg | pythondev_help_Meg_2017-09-25T16:08:39.000453 | 1,506,355,719.000453 | 94,610 |
pythondev | help | I plan on using at least four distributor workers, and about 20 single page workers, so this can easily overwhelm the solr import API | 2017-09-25T16:09:26.000417 | Meg | pythondev_help_Meg_2017-09-25T16:09:26.000417 | 1,506,355,766.000417 | 94,611 |
pythondev | help | <@Tameika>, something like so? | 2017-09-25T16:42:22.000465 | Winnifred | pythondev_help_Winnifred_2017-09-25T16:42:22.000465 | 1,506,357,742.000465 | 94,612 |
pythondev | help | but if there are duplicates in the dataframe | 2017-09-25T17:22:41.000370 | Tameika | pythondev_help_Tameika_2017-09-25T17:22:41.000370 | 1,506,360,161.00037 | 94,613 |
pythondev | help | make sure you drop those before you pivot | 2017-09-25T17:22:59.000135 | Winnifred | pythondev_help_Winnifred_2017-09-25T17:22:59.000135 | 1,506,360,179.000135 | 94,614 |
pythondev | help | hello gurus | 2017-09-25T18:59:01.000159 | Margaretta | pythondev_help_Margaretta_2017-09-25T18:59:01.000159 | 1,506,365,941.000159 | 94,615 |
pythondev | help | happy monday | 2017-09-25T18:59:17.000068 | Margaretta | pythondev_help_Margaretta_2017-09-25T18:59:17.000068 | 1,506,365,957.000068 | 94,616 |
pythondev | help | what is your recommendation on crontab using python | 2017-09-25T18:59:43.000171 | Margaretta | pythondev_help_Margaretta_2017-09-25T18:59:43.000171 | 1,506,365,983.000171 | 94,617 |
pythondev | help | simple way to save jobs and run cron | 2017-09-25T19:00:07.000398 | Margaretta | pythondev_help_Margaretta_2017-09-25T19:00:07.000398 | 1,506,366,007.000398 | 94,618 |
pythondev | help | how to join the lobby anyone | 2017-09-25T19:18:51.000151 | Rosenda | pythondev_help_Rosenda_2017-09-25T19:18:51.000151 | 1,506,367,131.000151 | 94,619 |
pythondev | help | Lobby isn't for general chat, it is basically announcements | 2017-09-25T19:19:22.000129 | Mallie | pythondev_help_Mallie_2017-09-25T19:19:22.000129 | 1,506,367,162.000129 | 94,620 |
pythondev | help | <#C07EFN21K|random> is general chat | 2017-09-25T19:19:28.000179 | Mallie | pythondev_help_Mallie_2017-09-25T19:19:28.000179 | 1,506,367,168.000179 | 94,621 |
pythondev | help | oh^_^ thank you | 2017-09-25T19:20:59.000103 | Rosenda | pythondev_help_Rosenda_2017-09-25T19:20:59.000103 | 1,506,367,259.000103 | 94,622 |
pythondev | help | i think it’s also kinda messed up to be impersonating aaron swartz. | 2017-09-25T22:37:43.000186 | Johana | pythondev_help_Johana_2017-09-25T22:37:43.000186 | 1,506,379,063.000186 | 94,623 |
pythondev | help | Does anyone know of a way to use protobuf2 generated files with protobuf3+ library? | 2017-09-26T01:22:37.000109 | Carlota | pythondev_help_Carlota_2017-09-26T01:22:37.000109 | 1,506,388,957.000109 | 94,624 |
pythondev | help | Hello!
I would need some help with some Bottle API code.
I am sending a json object containing french text to an html page. I am using Bottle for that.
The problem is the output json text encoding ( Bottle encodes text as unicode, my output json file is by default in ascii).
```
>>> request.apparent_encoding
'ascii'
```
My request header dict:
```
{'Content-Length': '515', 'Date': 'Mon, 25 Sep 2017 22:09:35 GMT', 'Server': 'waitress', 'Content-Type': 'application/json'}
```
Any idea How I could "force" an utf-8 encoding on the output json file? ( Python 3.5 version )
Thank you! | 2017-09-26T02:50:56.000062 | Kandy | pythondev_help_Kandy_2017-09-26T02:50:56.000062 | 1,506,394,256.000062 | 94,625 |
pythondev | help | morning! anyone able to give me some advice on getting out of a while loop? python newbie here | 2017-09-26T07:25:26.000141 | Chi | pythondev_help_Chi_2017-09-26T07:25:26.000141 | 1,506,410,726.000141 | 94,626 |
pythondev | help | use ```break``` | 2017-09-26T07:25:49.000010 | Jorge | pythondev_help_Jorge_2017-09-26T07:25:49.000010 | 1,506,410,749.00001 | 94,627 |
pythondev | help | not allowed for this homework assignment | 2017-09-26T07:26:08.000075 | Chi | pythondev_help_Chi_2017-09-26T07:26:08.000075 | 1,506,410,768.000075 | 94,628 |
pythondev | help | write some condition in while ,eg: | 2017-09-26T07:26:55.000315 | Jorge | pythondev_help_Jorge_2017-09-26T07:26:55.000315 | 1,506,410,815.000315 | 94,629 |
pythondev | help | ```while count<0``` | 2017-09-26T07:27:04.000171 | Jorge | pythondev_help_Jorge_2017-09-26T07:27:04.000171 | 1,506,410,824.000171 | 94,630 |
pythondev | help | maybe some context would help. the assignment is to recreate the game of “Pig”, human vs computer. player rolls a die, and can keep rolling as many times as they want, and then the other player rolls. first player to 50 wins. if you roll a 6, your entire score for that round is 0. I’m work on the ask_yes_or_no method, which includes a prompt. | 2017-09-26T07:30:21.000330 | Chi | pythondev_help_Chi_2017-09-26T07:30:21.000330 | 1,506,411,021.00033 | 94,631 |
pythondev | help | ```
a = True
while a:
a = False
``` | 2017-09-26T07:38:50.000054 | Ciera | pythondev_help_Ciera_2017-09-26T07:38:50.000054 | 1,506,411,530.000054 | 94,632 |
pythondev | help | <@Chi> if you need to prompt, you can use something like `input("Enter yes or no")` | 2017-09-26T07:42:52.000385 | Shelly | pythondev_help_Shelly_2017-09-26T07:42:52.000385 | 1,506,411,772.000385 | 94,633 |
pythondev | help | the code is doing the opposite of what I want it to do. | 2017-09-26T07:44:42.000196 | Chi | pythondev_help_Chi_2017-09-26T07:44:42.000196 | 1,506,411,882.000196 | 94,634 |
pythondev | help | not sure if it’s appropriate to post the entire thing here (it’s 100 lines) | 2017-09-26T07:45:09.000178 | Chi | pythondev_help_Chi_2017-09-26T07:45:09.000178 | 1,506,411,909.000178 | 94,635 |
pythondev | help | this is the prompt function ```def ask_yes_or_no(prompt):
roll_again = True
while roll_again:
answer = input(prompt)
if answer.startswith("y") or answer == "yes":
roll_again = False #why does it run properly when roll_again = False and not True?
elif answer.startswith("n") or answer == "no":
break #not allowed, but not sure how else to get out of this
else:
print("sorry, what was that?")
``` | 2017-09-26T07:46:15.000010 | Chi | pythondev_help_Chi_2017-09-26T07:46:15.000010 | 1,506,411,975.00001 | 94,636 |
pythondev | help | when it’s nested in the computer_move method, and i run the program, if I type “no” it loops back and rolls the die again. if i type “yes” it just keeps asking “roll again?” | 2017-09-26T07:46:29.000401 | Chi | pythondev_help_Chi_2017-09-26T07:46:29.000401 | 1,506,411,989.000401 | 94,637 |
pythondev | help | so, a while loop looks at the variable sequence and evaluates it to true or false. | 2017-09-26T07:49:08.000047 | Meg | pythondev_help_Meg_2017-09-26T07:49:08.000047 | 1,506,412,148.000047 | 94,638 |
pythondev | help | you only set `roll_again` once in the loop, and that's when the input is that of 'Yes, I want to roll again' | 2017-09-26T07:49:42.000217 | Meg | pythondev_help_Meg_2017-09-26T07:49:42.000217 | 1,506,412,182.000217 | 94,639 |
pythondev | help | you should set `roll_again` to be True` in the `if` and `False` in the `elif` block | 2017-09-26T07:50:39.000285 | Meg | pythondev_help_Meg_2017-09-26T07:50:39.000285 | 1,506,412,239.000285 | 94,640 |
pythondev | help | ```def ask_yes_or_no(prompt):
roll_again = True
while roll_again:
answer = input(prompt)
if answer.startswith("y") or answer == "yes":
roll_again = True #why does it run properly when roll_again = False and not True?
elif answer.startswith("n") or answer == "no":
roll_again = False
#break #not allowed, but not sure how else to get out of this
else:
print("sorry, what was that?") ``` | 2017-09-26T07:52:10.000096 | Chi | pythondev_help_Chi_2017-09-26T07:52:10.000096 | 1,506,412,330.000096 | 94,641 |
pythondev | help | when i enter “yes”, it just endlessly keeps asking “roll again?” when i enter “no”, it rolls the die | 2017-09-26T07:52:51.000177 | Chi | pythondev_help_Chi_2017-09-26T07:52:51.000177 | 1,506,412,371.000177 | 94,642 |
pythondev | help | then the issue is whatever else is within the conditionals that you're not posting here | 2017-09-26T07:53:37.000052 | Meg | pythondev_help_Meg_2017-09-26T07:53:37.000052 | 1,506,412,417.000052 | 94,643 |
pythondev | help | you can post a code snippet by pressing the + at the side of the text entry and selecting `Code or Text Snippet` | 2017-09-26T07:54:02.000369 | Meg | pythondev_help_Meg_2017-09-26T07:54:02.000369 | 1,506,412,442.000369 | 94,644 |
pythondev | help | <@Chi> I feel like something is missing here | 2017-09-26T07:54:33.000124 | Shelly | pythondev_help_Shelly_2017-09-26T07:54:33.000124 | 1,506,412,473.000124 | 94,645 |
pythondev | help | ok. this is the whole program so far | 2017-09-26T07:55:28.000320 | Chi | pythondev_help_Chi_2017-09-26T07:55:28.000320 | 1,506,412,528.00032 | 94,646 |
pythondev | help | so with `ask_yes_or_no`, you're not returning a value there to use within the `while computer:` loop | 2017-09-26T07:57:05.000210 | Meg | pythondev_help_Meg_2017-09-26T07:57:05.000210 | 1,506,412,625.00021 | 94,647 |
pythondev | help | so you should modify the `ask_yes_or_no` conditionals to
```
if answer.startswith('y') or answer == 'yes':
return True
elif answer.startswith('n') or answer == 'no':
return False
else:
print('Sorry?')
``` | 2017-09-26T07:59:44.000370 | Meg | pythondev_help_Meg_2017-09-26T07:59:44.000370 | 1,506,412,784.00037 | 94,648 |
pythondev | help | because a `return` inside a loop is an implicit break execution | 2017-09-26T08:00:00.000347 | Meg | pythondev_help_Meg_2017-09-26T08:00:00.000347 | 1,506,412,800.000347 | 94,649 |
pythondev | help | that doesn’t break the loop. it continues to roll the die | 2017-09-26T08:04:04.000178 | Chi | pythondev_help_Chi_2017-09-26T08:04:04.000178 | 1,506,413,044.000178 | 94,650 |
pythondev | help | but I think you have your whole program structured wrong. | 2017-09-26T08:04:10.000257 | Meg | pythondev_help_Meg_2017-09-26T08:04:10.000257 | 1,506,413,050.000257 | 94,651 |
pythondev | help | we have to use the functions provided. starter code of sorts | 2017-09-26T08:06:02.000149 | Chi | pythondev_help_Chi_2017-09-26T08:06:02.000149 | 1,506,413,162.000149 | 94,652 |
pythondev | help | is this intro to programming? | 2017-09-26T08:06:18.000150 | Meg | pythondev_help_Meg_2017-09-26T08:06:18.000150 | 1,506,413,178.00015 | 94,653 |
pythondev | help | yes. intro to python and java | 2017-09-26T08:06:25.000076 | Chi | pythondev_help_Chi_2017-09-26T08:06:25.000076 | 1,506,413,185.000076 | 94,654 |
pythondev | help | thanks for your suggestions everyone. i’ll pick this back up when I get to work. have to catch the bus | 2017-09-26T08:07:03.000265 | Chi | pythondev_help_Chi_2017-09-26T08:07:03.000265 | 1,506,413,223.000265 | 94,655 |
pythondev | help | Hey everyone | 2017-09-26T08:19:36.000230 | Zack | pythondev_help_Zack_2017-09-26T08:19:36.000230 | 1,506,413,976.00023 | 94,656 |
pythondev | help | I am getting an error | 2017-09-26T08:19:41.000142 | Zack | pythondev_help_Zack_2017-09-26T08:19:41.000142 | 1,506,413,981.000142 | 94,657 |
pythondev | help | ```Traceback (most recent call last):
File "app.py", line 4, in <module>
from flask import Flask, redirect, url_for, session, request, jsonify, render_template, flask_restful
ImportError: cannot import name flask_restful
Traceback (most recent call last):
File "app.py", line 4, in <module>
from flask import Flask, redirect, url_for, session, request, jsonify, render_template, flask_restful``` | 2017-09-26T08:19:44.000319 | Zack | pythondev_help_Zack_2017-09-26T08:19:44.000319 | 1,506,413,984.000319 | 94,658 |
pythondev | help | there is no `flask_restful` in `flask` package | 2017-09-26T08:20:07.000435 | Suellen | pythondev_help_Suellen_2017-09-26T08:20:07.000435 | 1,506,414,007.000435 | 94,659 |
pythondev | help | you should import it separately if it's installed | 2017-09-26T08:20:15.000460 | Suellen | pythondev_help_Suellen_2017-09-26T08:20:15.000460 | 1,506,414,015.00046 | 94,660 |
pythondev | help | `import flask_restful` | 2017-09-26T08:20:19.000488 | Suellen | pythondev_help_Suellen_2017-09-26T08:20:19.000488 | 1,506,414,019.000488 | 94,661 |
pythondev | help | from flask import Flask, flask_restful | 2017-09-26T08:20:40.000141 | Zack | pythondev_help_Zack_2017-09-26T08:20:40.000141 | 1,506,414,040.000141 | 94,662 |
pythondev | help | its already there in app.py | 2017-09-26T08:20:46.000082 | Zack | pythondev_help_Zack_2017-09-26T08:20:46.000082 | 1,506,414,046.000082 | 94,663 |
pythondev | help | i also have ```Flask_RESTful==0.3.6``` in requirements.txt | 2017-09-26T08:21:15.000154 | Zack | pythondev_help_Zack_2017-09-26T08:21:15.000154 | 1,506,414,075.000154 | 94,664 |
pythondev | help | not `from flask import flask_restful`, but `import flask_restful` | 2017-09-26T08:21:32.000155 | Suellen | pythondev_help_Suellen_2017-09-26T08:21:32.000155 | 1,506,414,092.000155 | 94,665 |
pythondev | help | it's a separate package from flask | 2017-09-26T08:21:38.000023 | Suellen | pythondev_help_Suellen_2017-09-26T08:21:38.000023 | 1,506,414,098.000023 | 94,666 |
pythondev | help | ah okay i will try it | 2017-09-26T08:21:46.000114 | Zack | pythondev_help_Zack_2017-09-26T08:21:46.000114 | 1,506,414,106.000114 | 94,667 |
pythondev | help | hi all! | 2017-09-26T11:14:21.000295 | Winnie | pythondev_help_Winnie_2017-09-26T11:14:21.000295 | 1,506,424,461.000295 | 94,668 |
pythondev | help | I'm in need of some dire help, I think I broke python... | 2017-09-26T11:14:51.000185 | Winnie | pythondev_help_Winnie_2017-09-26T11:14:51.000185 | 1,506,424,491.000185 | 94,669 |
pythondev | help | I installed fb chat using `python3.6 -m pip install fbchat --user`
and then I got an error from bs4 saying
```
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
``` | 2017-09-26T11:16:12.000362 | Winnie | pythondev_help_Winnie_2017-09-26T11:16:12.000362 | 1,506,424,572.000362 | 94,670 |
pythondev | help | Now, trying to run `python3.6 -m pip uninstall bs4`
gives me
```
File "/usr/lib/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
``` | 2017-09-26T11:16:48.000132 | Winnie | pythondev_help_Winnie_2017-09-26T11:16:48.000132 | 1,506,424,608.000132 | 94,671 |
pythondev | help | Have you checked SO? <https://stackoverflow.com/questions/43124775/why-python-3-6-1-throws-attributeerror-module-enum-has-no-attribute-intflag#44466013> | 2017-09-26T11:35:15.000253 | Ronni | pythondev_help_Ronni_2017-09-26T11:35:15.000253 | 1,506,425,715.000253 | 94,672 |
pythondev | help | Thanks! | 2017-09-26T11:42:29.000412 | Winnie | pythondev_help_Winnie_2017-09-26T11:42:29.000412 | 1,506,426,149.000412 | 94,673 |
pythondev | help | for those curious, I needed to do:
`sudo python3.6 -m pip uninstall lxml`
`python3.6 -m pip install lxml --user` | 2017-09-26T12:07:38.000761 | Winnie | pythondev_help_Winnie_2017-09-26T12:07:38.000761 | 1,506,427,658.000761 | 94,674 |
pythondev | help | Hey guys, any of you guys know mongodb? I'm trying to make a query but I'm not able to find a way.
I need to sort a collection with a triple of its fields but no matter what I do I can only manage to sort by the first element.
```
for e in OBJ.objects.aggregate(*[{
"$sort": {"priority": 1}
}]):
print(e.get('priority'), e.get('creation_datetime'), e.get('object_type'))
<tel:1002017-01-01|100 2017-01-01> 00:00:00 free
<tel:2002017-01-05|200 2017-01-05> 00:00:00 free
<tel:3002017-01-01|300 2017-01-01> 00:00:00 paid
<tel:4002017-01-03|400 2017-01-03> 00:00:00 free
<tel:5002017-01-02|500 2017-01-02> 00:00:00 paid
for e in OBJ.objects.aggregate(*[{
"$sort": {"priority": -1}
}]):
print(e.get('priority'), e.get('creation_datetime'), e.get('object_type'))
<tel:5002017-01-02|500 2017-01-02> 00:00:00 paid
<tel:4002017-01-03|400 2017-01-03> 00:00:00 free
<tel:3002017-01-01|300 2017-01-01> 00:00:00 paid
<tel:2002017-01-05|200 2017-01-05> 00:00:00 free
<tel:1002017-01-01|100 2017-01-01> 00:00:00 free
for e in OBJ.objects.aggregate(*[{
"$sort": {"priority": -1, "creation_datetime": 1 }
}]):
print(e.get('priority'), e.get('creation_datetime'), e.get('object_type'))
<tel:5002017-01-02|500 2017-01-02> 00:00:00 paid
<tel:4002017-01-03|400 2017-01-03> 00:00:00 free
<tel:3002017-01-01|300 2017-01-01> 00:00:00 paid
<tel:2002017-01-05|200 2017-01-05> 00:00:00 free
<tel:1002017-01-01|100 2017-01-01> 00:00:00 free
for e in OBJ.objects.aggregate(*[{
"$sort": {"priority": -1, "creation_datetime": 1, "object_type": 1 }
}]):
print(e.get('priority'), e.get('creation_datetime'), e.get('object_type'))
<tel:5002017-01-02|500 2017-01-02> 00:00:00 paid
<tel:4002017-01-03|400 2017-01-03> 00:00:00 free
<tel:3002017-01-01|300 2017-01-01> 00:00:00 paid
<tel:2002017-01-05|200 2017-01-05> 00:00:00 free
<tel:1002017-01-01|100 2017-01-01> 00:00:00 free
```
Do you have any idea why? Already went to check the *$sort* operator page on MongoDB manual and although they say it works with two fields, I don't seem to be able to replicate the functionality.
> "This operation sorts the documents in the users collection, in descending order according by the age field and then in ascending order according to the value in the posts field." (<https://docs.mongodb.com/manual/reference/operator/aggregation/sort/index.html#ascending-descending-sort>)
> "$sort" operator: <https://docs.mongodb.com/manual/reference/operator/aggregation/sort/index.html>
Thanks :slightly_smiling_face: | 2017-09-26T14:25:11.000061 | Matha | pythondev_help_Matha_2017-09-26T14:25:11.000061 | 1,506,435,911.000061 | 94,675 |
pythondev | help | Has anyone worked with bluetoothctl via python? I wanna automate the setup initialization, auto pairing (no pin required), etc... | 2017-09-26T14:36:20.000099 | Chrystal | pythondev_help_Chrystal_2017-09-26T14:36:20.000099 | 1,506,436,580.000099 | 94,676 |
pythondev | help | I’m trying to pass a context variable to my template as a url:
`context['parent'] = "<a href="{% url 'aircraft' %}">Aircraft</a>`
To show up in my breadcrumbs like `Home / {{parent}} / {{page_title}}`
I’ve tried several different ways but can’t get a good google result. I must be fighting the framework? | 2017-09-26T16:20:51.000300 | Tammi | pythondev_help_Tammi_2017-09-26T16:20:51.000300 | 1,506,442,851.0003 | 94,677 |
pythondev | help | <https://docs.djangoproject.com/en/1.11/ref/urlresolvers/#reverse> | 2017-09-26T16:25:32.000024 | Meg | pythondev_help_Meg_2017-09-26T16:25:32.000024 | 1,506,443,132.000024 | 94,678 |
pythondev | help | that's what you're looking for in place of the `url` tag in the template | 2017-09-26T16:25:44.000580 | Meg | pythondev_help_Meg_2017-09-26T16:25:44.000580 | 1,506,443,144.00058 | 94,679 |
pythondev | help | since you would have to do this in the view | 2017-09-26T16:25:52.000579 | Meg | pythondev_help_Meg_2017-09-26T16:25:52.000579 | 1,506,443,152.000579 | 94,680 |
pythondev | help | Do you have to cite an image taken from Instagram? Also, whil I am thinking about it do i just cite the image by putting `source: url` in the alt tag? | 2017-09-26T16:45:55.000337 | Vita | pythondev_help_Vita_2017-09-26T16:45:55.000337 | 1,506,444,355.000337 | 94,681 |
pythondev | help | what are you using them for? | 2017-09-26T16:48:35.000540 | Suellen | pythondev_help_Suellen_2017-09-26T16:48:35.000540 | 1,506,444,515.00054 | 94,682 |
pythondev | help | fair use might apply and make things easy | 2017-09-26T16:49:16.000381 | Suellen | pythondev_help_Suellen_2017-09-26T16:49:16.000381 | 1,506,444,556.000381 | 94,683 |
pythondev | help | also <@Vita> citations need to be visible, not just an alt tag | 2017-09-26T16:51:32.000646 | Patty | pythondev_help_Patty_2017-09-26T16:51:32.000646 | 1,506,444,692.000646 | 94,684 |
pythondev | help | I don't think citation is going to help, as by default images aren't published with a license | 2017-09-26T16:52:01.000030 | Suellen | pythondev_help_Suellen_2017-09-26T16:52:01.000030 | 1,506,444,721.00003 | 94,685 |
pythondev | help | i.e. you straight up can't use them without talking to their author | 2017-09-26T16:52:17.000012 | Suellen | pythondev_help_Suellen_2017-09-26T16:52:17.000012 | 1,506,444,737.000012 | 94,686 |
pythondev | help | (except "fair use") | 2017-09-26T16:52:26.000706 | Suellen | pythondev_help_Suellen_2017-09-26T16:52:26.000706 | 1,506,444,746.000706 | 94,687 |
pythondev | help | well that was just an “if a citation is needed” | 2017-09-26T16:52:39.000132 | Patty | pythondev_help_Patty_2017-09-26T16:52:39.000132 | 1,506,444,759.000132 | 94,688 |
pythondev | help | but, yes, it depends on usage | 2017-09-26T16:52:50.000513 | Patty | pythondev_help_Patty_2017-09-26T16:52:50.000513 | 1,506,444,770.000513 | 94,689 |
pythondev | help | Using them for an event, people who attended the event in the past uploaded pics to insta...and okay cool, thanks for letting me know | 2017-09-26T16:52:58.000042 | Vita | pythondev_help_Vita_2017-09-26T16:52:58.000042 | 1,506,444,778.000042 | 94,690 |
pythondev | help | <@Patty> <@Suellen> :taco: | 2017-09-26T16:53:43.000004 | Vita | pythondev_help_Vita_2017-09-26T16:53:43.000004 | 1,506,444,823.000004 | 94,691 |
pythondev | help | well... good news for you, kind of | 2017-09-26T16:54:08.000316 | Suellen | pythondev_help_Suellen_2017-09-26T16:54:08.000316 | 1,506,444,848.000316 | 94,692 |
pythondev | help | when you are reporting news you can use the images | 2017-09-26T16:54:19.000423 | Suellen | pythondev_help_Suellen_2017-09-26T16:54:19.000423 | 1,506,444,859.000423 | 94,693 |
pythondev | help | It's an event website, would that still count as news? | 2017-09-26T16:54:54.000412 | Vita | pythondev_help_Vita_2017-09-26T16:54:54.000412 | 1,506,444,894.000412 | 94,694 |
pythondev | help | so its advertising events? | 2017-09-26T16:55:07.000333 | Patty | pythondev_help_Patty_2017-09-26T16:55:07.000333 | 1,506,444,907.000333 | 94,695 |
pythondev | help | and you want to use images from past events that were done? | 2017-09-26T16:55:18.000685 | Patty | pythondev_help_Patty_2017-09-26T16:55:18.000685 | 1,506,444,918.000685 | 94,696 |
pythondev | help | Wait, i said that wrong...sec | 2017-09-26T16:55:19.000153 | Vita | pythondev_help_Vita_2017-09-26T16:55:19.000153 | 1,506,444,919.000153 | 94,697 |
pythondev | help | It's a site for a group that will have a section for this event and the images will be used there | 2017-09-26T16:56:11.000289 | Vita | pythondev_help_Vita_2017-09-26T16:56:11.000289 | 1,506,444,971.000289 | 94,698 |
pythondev | help | and yes to your question joe | 2017-09-26T16:56:20.000110 | Vita | pythondev_help_Vita_2017-09-26T16:56:20.000110 | 1,506,444,980.00011 | 94,699 |
pythondev | help | so it seems like you’re using past images to promote the event? | 2017-09-26T16:57:48.000053 | Patty | pythondev_help_Patty_2017-09-26T16:57:48.000053 | 1,506,445,068.000053 | 94,700 |
pythondev | help | Yep! | 2017-09-26T16:58:08.000343 | Vita | pythondev_help_Vita_2017-09-26T16:58:08.000343 | 1,506,445,088.000343 | 94,701 |
pythondev | help | yep, can’t do that without the permission of the owners of the image | 2017-09-26T16:59:06.000589 | Patty | pythondev_help_Patty_2017-09-26T16:59:06.000589 | 1,506,445,146.000589 | 94,702 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.