Hey all, 

Thanks for the help and suggestions.
Yeah i tried the bases hack and it doesn't really work.

Decided to go with the ajax suggestion of checking for new orders every 
minute and reloading the page if there were new ones.



On Friday, May 15, 2015 at 4:48:47 AM UTC+8, Stephen McDonald wrote:
>
> Well thanks for actually clarifying what you're trying to do.
>
> As others said if you can get away with AJAX it'll be a lot easier. 
> Otherwise if the __bases__ hacks I mentioned don't work, it's certainly 
> feasible to create a tiny websocket pubsub server using 
> gevent+gunicorn+redis without any frameworks. I've done it on a handful of 
> projects and the following code is the basic shell of what I use:
>
> https://gist.github.com/stephenmcd/d7551ba68d01b1d889d2
>
> Provided as is without any support, but everything you need is there :-)
>
>
> On Thu, May 14, 2015 at 10:03 AM, Andrew Fam <[email protected] 
> <javascript:>> wrote:
>
>> Hey Stephen thanks for this.
>>
>> Yes I understand AJAX and a real time update.
>>
>> The store I"m working with sells quite fast moving products and needed a 
>> consolidated orders view that would be automatically updated once orders 
>> came in.
>> So, instead of having to click refresh the page to see the new orders, I 
>> was looking for a way for the page to update once a new order came in.
>>
>> Best regards,
>> Andrew
>>
>>
>> On Sunday, May 10, 2015 at 7:03:58 AM UTC+8, Stephen McDonald wrote:
>>>
>>> Hi there,
>>>
>>> "real time" is incredibly vague and begs for a stricter definition. The 
>>> true meaning indicates a guaranteed response time, which is most likely not 
>>> what your client means (http://en.wikipedia.org/wiki/Real-time_computing
>>> ). 
>>>
>>> What they most likely mean is "submits without reloading the page", in 
>>> which case, rather than introducing a whole separate moving part into your 
>>> stack (a websocket server), along with what appears to be another 
>>> framework, you could achieve the desired result simply by making an AJAX 
>>> request in the checkout process. 
>>>
>>> If unfortunately your client actually means "has to use websockets", 
>>> then you might be able monkey-patch the relevant model doing something 
>>> like: 
>>>
>>> Foo.__bases__ = (SelfPublishModel,) + Foo.__bases__
>>>
>>> But before you go down that path I think you'd do yourself and your 
>>> client a favour by educating them on using the best tool for the job rather 
>>> than having them dictate your architecture to you :-)
>>>
>>> Good luck!
>>>
>>>
>>>
>>> On Sat, May 9, 2015 at 2:57 PM, Andrew Fam <[email protected]> wrote:
>>>
>>>> I'm thinking of using mezzanine but a client wants a real time update 
>>>> of orders.
>>>>
>>>> http://swampdragon.net/documentation/quick-start/
>>>>
>>>> from django.db import modelsfrom swampdragon.models import 
>>>> SelfPublishModelfrom .serializers import FooSerializer
>>>>
>>>> class Foo(SelfPublishModel, models.Model):
>>>>     serializer_class = FooSerializer
>>>>     text = models.CharField(max_length=100)
>>>>
>>>>
>>>> Got this off the swampdragon page and they require an addition of 
>>>> SelfPublishModel to any object that you need realtime support.
>>>> Any idea how to do this with cartridge?
>>>>
>>>>
>>>> Best regarsd,
>>>> Andrew
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Mezzanine Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Stephen McDonald
>>> http://jupo.org
>>>  
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Stephen McDonald
> http://jupo.org
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to