Re: Feature: Support Server-Sent Events

2015-06-06 Thread Tobias Oberstein
-Services/ Essentially, you can push a real-time events from within Django by doing a plain old (outgoing) HTTP/POST to the Crossbar.io bridge service, which will forward the PubSub event to all authorized subscribers via WebSocket (or any of the WAMP fallback or alternative transports like Long

Re: Feature: Support Server-Sent Events

2015-06-02 Thread Emil Stenström
Hi, On Tuesday, 2 June 2015 11:25:14 UTC+2, Andrew Godwin wrote: > > Hi Emil, > > I agree that there perhaps needs to be a more "pull" here than just making > a third party app, but I feel I can speak from a good place when I say > third party apps can absolutely prove core Django features in a

Re: Feature: Support Server-Sent Events

2015-06-02 Thread Andrew Godwin
Hi Emil, I agree that there perhaps needs to be a more "pull" here than just making a third party app, but I feel I can speak from a good place when I say third party apps can absolutely prove core Django features in a way that gives them much faster release cycles and freedom from things like LTS

Re: Feature: Support Server-Sent Events

2015-06-01 Thread Emil Stenström
Thanks for you reply Andrew, On Monday, 1 June 2015 13:05:34 UTC+2, Andrew Godwin wrote: > > Just to chime in here - I've long been in favour of some kind of support > for event-driven stuff inside Django, but as Curtis is saying, there's > nothing here that couldn't be done in a third party app

Re: Feature: Support Server-Sent Events

2015-06-01 Thread Emil Stenström
On Monday, 1 June 2015 01:42:38 UTC+2, Curtis Maloney wrote: > > I think the real questions are: > > 1. What is stopping a 3rd party product from providing the features you > want? > Nothing as far as I see it. Will develop as a third part > 2. Why should your solution be the "blessed" solu

Re: Feature: Support Server-Sent Events

2015-06-01 Thread Andrew Godwin
Just to chime in here - I've long been in favour of some kind of support for event-driven stuff inside Django, but as Curtis is saying, there's nothing here that couldn't be done in a third party app first and then proven there before any possible merge into core. I also don't think that this prop

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Curtis Maloney
I think the real questions are: 1. What is stopping a 3rd party product from providing the features you want? If there is something Django can do to make it easier, point it out, and I'll gladly champion a good feature. 2. Why should your solution be the "blessed" solution? The discussion clear

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Emil Stenström
On Sunday, 31 May 2015 15:56:09 UTC+2, Florian Apolloner wrote: > > On Saturday, May 30, 2015 at 10:40:26 PM UTC+1, Emil Stenström wrote: >> >> Client A clicks a button on the site, that sends an normal ajax request >> to Django. In the view a message is passed from Django to the SSE process. >> >

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Emil Stenström
that's a much older decision). > Isn't this exactly what I'm proposing? A small simple program that gives Django users access to server sent events in their Django project? > If you want tighter integration with Django, I think it would best be done > via your program in

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Joe Tennies
I'm going to kind of reiterate what Florian said. The fact that you keep describing your idea as another process/thread that has back and forth communication with the actual Django instance seems to indicate to me that it's another program. I think people here tend to follow more of the UNIX philo

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Florian Apolloner
On Saturday, May 30, 2015 at 10:40:26 PM UTC+1, Emil Stenström wrote: > > Client A clicks a button on the site, that sends an normal ajax request to > Django. In the view a message is passed from Django to the SSE process. > How, you still need some kind of interprocess communication So the S

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Emil Stenström
On Sunday, 31 May 2015 11:16:17 UTC+2, Javier Guerra wrote: > > On Sun, May 31, 2015 at 3:52 AM, Emil Stenström > > wrote: > > Could you help me understand why this have to be done inside a web > server > > container? > > AFAICT, it doesn't have to be done in the container, but currently it >

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Emil Stenström
On Sunday, 31 May 2015 11:15:28 UTC+2, Federico Capoano wrote: > > On Sunday, May 31, 2015 at 10:52:26 AM UTC+2, Emil Stenström wrote: > ... > >> Also, I don't think you would need to mix redis (or any other persistent >> storage) into this. The connected clients could simply be stored in an >>

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Javier Guerra Giraldez
On Sun, May 31, 2015 at 3:52 AM, Emil Stenström wrote: > Could you help me understand why this have to be done inside a web server > container? AFAICT, it doesn't have to be done in the container, but currently it must be 'outside' of Django. But having help from the container allows a single re

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Federico Capoano
Hey Emil, On Sunday, May 31, 2015 at 10:52:26 AM UTC+2, Emil Stenström wrote: ... > Also, I don't think you would need to mix redis (or any other persistent > storage) into this. The connected clients could simply be stored in an > in-memory array, that is discarded if the server crashes. When

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Emil Stenström
Could you help me understand why this have to be done inside a web server container? When I've previously read about reasons for that they tend to be things like "handling slow clients", something that an event loop is excellent at automatically. To me, this means that this process could run ou

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Roberto De Ioris
> On Sun, May 31, 2015 at 1:23 AM, Roberto De Ioris > wrote: >> I obviously agree, but take in account that this uWSGI plugin simplified >> the steps a lot: >> >> https://github.com/unbit/uwsgi-sse-offload > > > nice. it certainly looks cleaner than having an external gevent > process. does it

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Javier Guerra Giraldez
On Sun, May 31, 2015 at 1:23 AM, Roberto De Ioris wrote: > I obviously agree, but take in account that this uWSGI plugin simplified > the steps a lot: > > https://github.com/unbit/uwsgi-sse-offload nice. it certainly looks cleaner than having an external gevent process. does it support sending

Re: Feature: Support Server-Sent Events

2015-05-30 Thread Roberto De Ioris
> On Sat, May 30, 2015 at 4:19 PM, Florian Apolloner > wrote: >> ie how would it use Django's current featureset which is basically >> blocking >> everywhere… > > On Sat, May 30, 2015 at 4:40 PM, Emil Stenström wrote: >> The separate process would have none of Django's features, it would just >>

Re: Feature: Support Server-Sent Events

2015-05-30 Thread Javier Guerra Giraldez
On Sat, May 30, 2015 at 4:19 PM, Florian Apolloner wrote: > ie how would it use Django's current featureset which is basically blocking > everywhere… On Sat, May 30, 2015 at 4:40 PM, Emil Stenström wrote: > The separate process would have none of Django's features, it would just be > a way to se

Re: Feature: Support Server-Sent Events

2015-05-30 Thread Emil Stenström
t connects to clients and passes on messages the all clients connected. Does this make sense? /E On Saturday, 30 May 2015 23:19:25 UTC+2, Florian Apolloner wrote: > > Hi Emil, > > while supporting server-sent events (or even websockets for that matter) > would be great, this is

Re: Feature: Support Server-Sent Events

2015-05-30 Thread Florian Apolloner
Hi Emil, while supporting server-sent events (or even websockets for that matter) would be great, this is basically a problem which has to be tackled in WSGI first in my opinion. That said, when you talk about a separate process, how would it look like (aside from using asycio), ie how would

Re: Feature: Support Server-Sent Events

2015-05-30 Thread Emil Stenström
Hi Collin, I'll answer in this thread to keep here things tidy. Since Server-Sent Events are just HTTP you can scale them the same way you scale your normal web app. Split users so some users hit one server and some users hit another. Then let Django communicate with all server proc

Feature: Support Server-Sent Events

2015-05-30 Thread Emil Stenström
Hi, This is the third feature proposal as part of my general drive for getting Django to work better for javascript heavy sites. Support Server-Sent Events -- If you want a snappy user experience, AJAX polling isn't enough. There are two major ways to get out o

Re: AttributeError: module 'object' has no attribute events

2011-01-04 Thread Wesley Chun
+1 that this is not the correct list for you. before you go elsewhere, below are similar errors that i'm not sure if this is related to your situation, but it may help: http://www.google.com/search?q=appengine+OR+"app+engine"+"AttributeError:+'module'+object+has+no+attribute" http://code.google.c

Re: AttributeError: module 'object' has no attribute events

2011-01-03 Thread Russell Keith-Magee
On Tue, Jan 4, 2011 at 2:07 AM, Yo-Yo Ma wrote: > I would head over the the django-users list (this one's for > development on Django itself): http://groups.google.com/group/django-users/ > Also, you might try Stack Overflow. It's a great place to get quick > answers. You might also try the djang

Re: AttributeError: module 'object' has no attribute events

2011-01-03 Thread Yo-Yo Ma
from google.appengine.api import yaml_builder >   File "/usr/local/google_appengine/google/appengine/api/ > yaml_builder.py", line 29, in >     from google.appengine.api import yaml_listener >   File "/usr/local/google_appengine/google/appengine/api/ > yaml_listener.py

AttributeError: module 'object' has no attribute events

2011-01-03 Thread Ondřej Mirtes
yaml_listener.py", line 30, in yaml.events.StreamStartEvent: 'StreamStart', AttributeError: 'module' object has no attribute 'events' It looks like the "import yaml" command imports different yaml library than SDK expects. I originally tried to setu

Django events during OSCON

2008-07-16 Thread Michael Richardson
Hi everyone! I'm also posting this to django-users and I apologize for those of you who get this twice. Next week is OSCON in Portland, Oregon. For anybody attending OSCON, or anybody who's going to be in the greater Portland metropolitan area, here's a lineup of Django-rel

Re: Re: why are the date-based views restricted to only displaying past-events?

2006-07-27 Thread Adrian Holovaty
On 7/26/06, monkeynut <[EMAIL PROTECTED]> wrote: > http://code.djangoproject.com/ticket/2433 > .. hopefully I didn't miss anything, I've been out in the sun all day. Good stuff, Pete! I've committed that patch. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~

Re: Re: Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread monkeynut
Yep, that's me. There'll be some funkiness because they both work out the next/previous month/day in different ways, with this later patch using the current next/previous system.. but it shouldn't be too difficult to combine them into one super-patch : ) Pete.On 7/26/06, Tyson Tate <[EMAIL PROTECTE

Re: Re: Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Tyson Tate
On 7/26/06, monkeynut <[EMAIL PROTECTED]> wrote: > http://code.djangoproject.com/ticket/2433 > .. hopefully I didn't miss anything, I've been out in the sun all day. > > Pete. Not sure if you're the same Pete, but hopefully that patch can work well with this one: http://code.djangoproject.com/tic

Re: Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread monkeynut
http://code.djangoproject.com/ticket/2433.. hopefully I didn't miss anything, I've been out in the sun all day.Pete. On 7/26/06, Jay Parlar <[EMAIL PROTECTED]> wrote: On 7/26/06, Tyson Tate <[EMAIL PROTECTED]> wrote:> I'm +50 on this because I'm about ready to jump in to a large calendar> project n

Re: Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Jay Parlar
On 7/26/06, Tyson Tate <[EMAIL PROTECTED]> wrote: > I'm +50 on this because I'm about ready to jump in to a large calendar > project next week and I'll need this functionality. If no one beats me > to it, I'll try to remember to hammer out a patch next week. > > Any suggestions for how people wou

Re: Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Pete Crosier
I was reading this post, then realised I needed to do this.. I've put together a patch that uses the allow_future idea. Should I make a new ticket and attach it for criticism? : )Pete. On 7/26/06, Tyson Tate <[EMAIL PROTECTED]> wrote: On 7/26/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:> It'll

Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Ian Holsman
based viewing slightly differently. it shows you events from/upto a given point in time, as opposed to that particular month/day.see http://zyons.com/event/ for an example of it.On 27/07/2006, at 7:16 AM, Tyson Tate wrote:On 7/26/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: It'll g

Re: Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Tyson Tate
On 7/26/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > It'll get fixed one day, since it's useful functionality. Somebody can > submit a patch or I'll write it one day (low priority). It's really just > waiting on a patch that has reasonable API. > > Regards, > Malcolm I'm +50 on this becaus

Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Malcolm Tredinnick
On Wed, 2006-07-26 at 09:23 -0400, Jay Parlar wrote: [...] > Adrian's justification was that the system was built for "archival" > purposes. I brought this up earlier in Django-users, > http://groups.google.com/group/django-users/browse_thread/thread/5b5d4fa5ad40f7bf/95de22e1e42b5d21 > > A thread

Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Ian Holsman
On 26/07/2006, at 11:23 PM, Jay Parlar wrote: Adrian's justification was that the system was built for "archival"purposes. I brought this up earlier in Django-users,http://groups.google.com/group/django-users/browse_thread/thread/5b5d4fa5ad40f7bf/95de22e1e42b5d21A thread you seem to have participat

Re: why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Jay Parlar
On 7/26/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > > Hi. > > I was wondering what the rationale is behind having the date-based generic > views only show 'historical' events. > they all seem to have > # Only bother to check current date if the

why are the date-based views restricted to only displaying past-events?

2006-07-26 Thread Ian Holsman
Hi.I was wondering what the rationale is behind having the date-based generic views only show 'historical' events.they all seem to have    # Only bother to check current date if the date isn't in the past.    if date >= now.date():        lookup_kwargs['%s__lte' % date_field] = nowyes I know I can

Re: Events

2006-01-07 Thread Adrian Holovaty
On 1/7/06, Brant Harris <[EMAIL PROTECTED]> wrote: > What's the status on the idea of an event system for Django? We've added an event system in the magic-removal branch. We're using PyDispatcher, and it's available in the django.dispatch package. Adrian -- Adrian Holovaty holovaty.com | django

Events

2006-01-07 Thread Brant Harris
What's the status on the idea of an event system for Django? I ask because I've been thinking of a more comprehensive database transitioning peice, built as a stand-alone django-app. I'd like it to be able to see when the model was updated and store info about it. Regestering for a sort of star