Files
2012-02-21 01:15:00 -05:00

1 line
7.5 KiB
JSON

[{"user_id": 8990, "stars": [{"date_created": 1299470459.9205861, "user_id": 1}, {"date_created": 1300325854.2297771, "user_id": 14492}], "topic_id": 11219, "date_created": 1299470445.5944691, "message": "is that I can get to people who know what I want to know", "group_id": 81, "id": 283839}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299470273.4880331, "message": "@ericflo like when you sent me that message I got a pop up in the upper right corner", "group_id": 81, "id": 283823}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299470249.474755, "message": "@myusuf3 I don't quite follow", "group_id": 81, "id": 283817}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299470401.6947081, "message": "simpler problem because I am not waiting on user actions", "group_id": 81, "id": 283831}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299470421.0671811, "message": "kk cool thanks", "group_id": 81, "id": 283833}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299470436.6130061, "message": "btw the one thing i am starting to realize I love about this app", "group_id": 81, "id": 283836}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299470529.067858, "message": "thanks for the advice", "group_id": 81, "id": 284084}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299470311.997349, "message": "@myusuf3 Ahh yes, that's because we have an open real-time channel that we can send messages through, but it wasn't trivial to create that channel", "group_id": 81, "id": 283825}, {"user_id": 8990, "stars": [{"date_created": 1299470072.747411, "user_id": 1}], "topic_id": 11219, "date_created": 1299470019.7622859, "message": "Dont worry I am not asking about pop up adds; I was wondering how to make my django app push *toast messages* i think they are called. Like when you create a new topic here on convore; something along those lines. I was wondering what is required to do that for django. what technologies are required? pure python and django?", "group_id": 81, "id": 283799}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299470113.396611, "message": "@myusuf3 Basically you need to first establish some kind of channel between the server and the client where you can inform the client when it's time to send a message.", "group_id": 81, "id": 283806}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299470165.2303641, "message": "The easiest way to do that is to make an endpoint in the Django app, and then have javascript poll it every few seconds, and the endpoint will respond with messages if there are some and none if there aren't.", "group_id": 81, "id": 283809}, {"user_id": 1, "stars": [{"date_created": 1299487275.18138, "user_id": 4546}], "topic_id": 11219, "date_created": 1299470184.2012041, "message": "Then use javascript and something like gritter ( http://boedesign.com/demos/gritter/ ) to display the toast", "group_id": 81, "id": 283811}, {"user_id": 8990, "stars": [{"date_created": 1299470460.533421, "user_id": 1}, {"date_created": 1300325858.3057599, "user_id": 14492}], "topic_id": 11219, "date_created": 1299470450.999666, "message": "and have a conversation", "group_id": 81, "id": 283841}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299470219.2421751, "message": "So that works OK, but doesn't scale well since every user will be polling your site a decent amount, and if you set your polling frequency too low, it won't be very real time", "group_id": 81, "id": 283814}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299470227.1603169, "message": "yeah but what i am trying to do is more based on fixed data that changes and notifications need to be sent when that change happens as supposed to when the user does something on the website. I suppose that would be easier correct?", "group_id": 81, "id": 283815}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299470313.3267529, "message": "what I would like to do is check some data the user provides me; and check to see if something is true; and if do a pop up of some sort", "group_id": 81, "id": 283826}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299470330.242178, "message": "like the chat notification", "group_id": 81, "id": 283828}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299470355.519098, "message": "@myusuf3 Oh! You can do that with an AJAX call then. Just do an HTTP request to check the data, if it's good, then have javascript use gritter to show the message.", "group_id": 81, "id": 283829}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299470436.1950469, "message": "@myusuf3 No problem, how it all works out :)", "group_id": 81, "id": 283835}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299470439.2451861, "message": "Err hope", "group_id": 81, "id": 283837}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299477514.189811, "message": "As far as I know there's nothing that will do this django integration automatically", "group_id": 81, "id": 285815}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299477537.821732, "message": "Fortunately it shouldn't be too much code", "group_id": 81, "id": 285818}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299477206.248889, "message": "I cant seem to find any django specific content", "group_id": 81, "id": 285806}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299477107.237247, "message": "@ericflo How do you integrate django with gritter?", "group_id": 81, "id": 285798}, {"user_id": 1, "stars": [], "topic_id": 11219, "date_created": 1299477445.2937851, "message": "@myusuf3 create a django URL that you make a request to with an XMLHTTPRequest, and then write some JavaScript to create the gritter message", "group_id": 81, "id": 285812}, {"user_id": 12394, "stars": [{"date_created": 1299506862.804147, "user_id": 7179}], "topic_id": 11219, "date_created": 1299490993.2459359, "message": "You could roll a real-time channel yourself using e.g. Tornado, but http://pusherapp.com/ makes it easy.", "group_id": 81, "id": 286556}, {"user_id": 18347, "stars": [], "topic_id": 11219, "date_created": 1299496492.063642, "message": "@myusuf3 easiest method would be to store events in a flat chronological list and do long polling against an exposed method that checks for relevant events. Then just let the javascript do everything.", "group_id": 81, "id": 286946}, {"user_id": 18347, "stars": [{"date_created": 1300170415.304965, "user_id": 13954}], "topic_id": 11219, "date_created": 1299496531.2555709, "message": "You could use socket.io and gevent-socketio to make something slightly more sophisticated :)", "group_id": 81, "id": 286948}, {"user_id": 8990, "stars": [], "topic_id": 11219, "date_created": 1299529120.665761, "message": "respect I will take a look at those suggestions", "group_id": 81, "id": 290547}, {"user_id": 1479, "stars": [], "topic_id": 11219, "date_created": 1300167358.601176, "message": "asdasda", "group_id": 81, "id": 353594}, {"user_id": 4077, "stars": [], "topic_id": 11219, "date_created": 1300159961.8871751, "message": "For async, realtime polling requests, you need to be using SOMEthing other than Django -- Here's a pretty decent example of how it works on Tornado, which works well enough with Django that it won't complicate your stack much at all -- http://stackoverflow.com/questions/2317501/asynchronous-comet-query-with-tornado-and-prototype", "group_id": 81, "id": 353232}]