Python: New Django Fathead #673
Conversation
Django DocumentationDescription: Reference for the Python Django Framework Example Query: Django allowed_hosts, django auth, django static Tab Name: About Source: https://docs.djangoproject.com/en/ These are the important fields from the IA page. Please check these for errors or missing information and update the IA page This is an automated message which will be updated as changes are made to the IA page |
@vigzmv thanks for this -- I've changed your IA Page ID to This is necessary as the ID must match the directory for your Fathead, which is currently As well, I need you to move the removal of the django_built_ins IA to a separate PR, which should also contain the IA page link to that Fathead. This is necessary so we can identify the removal of the Fathead correctly. |
@vigzmv can you also please create a
This will allow those four phrase to come before/after any of the article titles in the output.txt and still trigger the Fathead. e.g. "django auth" will correctly trigger the Fathead. |
wget --quiet https://docs.djangoproject.com/en/1.10/ref/urls/ -O urls.html | ||
wget --quiet https://docs.djangoproject.com/en/1.10/ref/models/database-functions/ -O database-functions.html | ||
wget --quiet https://docs.djangoproject.com/en/1.10/ref/models/fields/ -O fields.html | ||
wget --quiet https://docs.djangoproject.com/en/1.10/ref/migration-operations/ -O migration-operations.html |
moollaza
Jan 3, 2017
Member
@vigzmv this is a great start -- the structure of the Django docs clearly doesn't lend itself to being parsed for classes/methods/attributes/etc
I have another idea though, what about downloading the HTML offline docs (instead of several files) and iterating over the Index?
It seems that most entries in the index indicate if they are a class, method, attribute or function in parenthesis. By scraping those and using the css classes on the page, I think we could reliably parse out all the methods, classes, attributes and functions from the docs?
@vigzmv this is a great start -- the structure of the Django docs clearly doesn't lend itself to being parsed for classes/methods/attributes/etc
I have another idea though, what about downloading the HTML offline docs (instead of several files) and iterating over the Index?
It seems that most entries in the index indicate if they are a class, method, attribute or function in parenthesis. By scraping those and using the css classes on the page, I think we could reliably parse out all the methods, classes, attributes and functions from the docs?
moollaza
Jan 3, 2017
Member
ideally then we would have more context when creating the output and we could more cleverly create redirects to handle queries like "django AddField class", "django add method" etc.
Of course that's not necessary for Version 1, but it may help to make the Fathead more flexible
ideally then we would have more context when creating the output and we could more cleverly create redirects to handle queries like "django AddField class", "django add method" etc.
Of course that's not necessary for Version 1, but it may help to make the Fathead more flexible
vigzmv
Jan 4, 2017
Author
Member
Yes. That's a good idea. I will working to improve this fathead.
Yes. That's a good idea. I will working to improve this fathead.
@vigzmv this is now live on Beta. Because it was installed automatically, you can use your username as a special trigger word to see the IA in action: https://beta.duckduckgo.com/?q=vigzmv+auth&ia=about The more unique article titles will work on their own though, without a trigger word: |
@vigzmv once you've moved the django_built_ins to a separate PR, and added in the trigger_words.txt file, this should be good for merge |
Thanks for the review. I Added Back django_built_ins & Created trigger_words.txt. |
I will send Another PR for Removal of Django_built_ins after this is merged. |
@vigzmv Thanks! This LGTM |
Description of new Instant Answer, or changes
Django Fathead
Related Issues and Discussions
Fixes #552
People to notify
@moollaza
Testing & Review
To be completed by Language Leader (or DDG Staff)
Pull Request
Instant Answer Page
$ duckpan test <fathead_id>
)Code
Pull Request Review Guidelines: https://docs.duckduckhack.com/programming-mission/pr-review.html
Instant Answer Page: https://duck.co/ia/view/django