These are chat archives for django/django

1st
Mar 2016
Dan Weaver
@dan-weaver
Mar 01 2016 00:48
hey folks I'm wondering if there's a good design pattern or library for managing large amounts of "integrations" that django might perscibe. Not so much for handleing the specifics of Oauth but rather a pattern for easily adding such integrations.
For instance I could imagine having mixins. like RealTimeIntegration
the slack integration may implement send_real_time_update by sending a slack chat message to someone's slack account
etc.
wondering if there's a library out there for this sort of thing
a requirement of such a library I guess would be 1. manage integrations in a database and then also implement each integrations behavior
Dan Weaver
@dan-weaver
Mar 01 2016 00:56
that may or may not make sense :)
would this be a job for django polymorphic
Kevin Gates
@kevinobama
Mar 01 2016 01:34
rails vs django, which one is better for website?
gofurbrente01
@gofur
Mar 01 2016 02:11
it's up to you @kevinobama ..
:)
Adjamilton Junior
@ajunior
Mar 01 2016 04:24
@kevinobama it is not about which one is better… it is about which one you are more confident to use
Ikhsan Noor Rosyidin
@essanpupil
Mar 01 2016 06:15
@kevinobama django is better for websites
Filip Figiel
@megapctr
Mar 01 2016 06:25
@dweave there's a general principles "program to abstractions, not implementations" which is the base for most design patterns
In general, font use the third party's library directly, but delegate it to some other code
For example, instead of using a this party code in your django view, write a function which uses this api
And call that function in your view
Syafiq Kamarul Azman
@syaffers
Mar 01 2016 09:56
is there a way to asynchronously check if a celery task is complete, or maybe once the async task is complete have celery send a "confirmation" response to a loaded template? The easiest way to visualise what I'm trying to do is when you're deploying a new AWS instance and there's that ajax loader in the status checks column which changes to X/X checks passed
habib kazemi
@kazemihabib
Mar 01 2016 10:19
how to convert the below to python requests
curl -k -F "request={'timezone':'America/New_York', 'lang':'en'};type=application/json" -F "voiceData=@hello.wav;type=audio/wav" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "ocp-apim-subscription-key: YOUR_SUBSCRIPTION_KEY" "https://api.api.ai/v1/query?v=20150910"
Filip Figiel
@megapctr
Mar 01 2016 12:18
@kazemihabib you can find that in requests documentation: http://docs.python-requests.org/en/master/api/
vaibhav jain
@vaibhav-jain
Mar 01 2016 17:32
Hey can someone please tell how to fix FK integrity error. https://dpaste.de/6mzJ https://dpaste.de/1fSc full traceback
Filip Figiel
@megapctr
Mar 01 2016 19:02
@vaibhav-jain you have to fix these errors
either by removing the rows that refer to invalid ID's
or creating dummy entries (pls don't)
if this fk has null=True, then set null