These are chat archives for django/django

Mar 2016
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
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
Mar 01 2016 00:56
that may or may not make sense :)
would this be a job for django polymorphic
Kevin Gates
Mar 01 2016 01:34
rails vs django, which one is better for website?
Mar 01 2016 02:11
it's up to you @kevinobama ..
Adjamilton Junior
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
Mar 01 2016 06:15
@kevinobama django is better for websites
Filip Figiel
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
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
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" ""
Filip Figiel
Mar 01 2016 12:18
@kazemihabib you can find that in requests documentation:
vaibhav jain
Mar 01 2016 17:32
Hey can someone please tell how to fix FK integrity error. full traceback
Filip Figiel
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