Re: Django-channels and JSON-RPC

2017-01-24 Thread Andrew Godwin
> > >> I am not sure to understand. In which case can there be messages/frames > lost?! Where does that happen? Between the server interface and the Django > layer? I would need to know more about that... Otherwise I might need to > move with uWSGI or something JSON-RPC in itself doesn't

Re: Django-channels and JSON-RPC

2017-01-24 Thread Fabien Millerand
> > > * A class than inherits from JsonWebsocketConsumer > That is what I started to do. > * That class' receive() method decodes incoming messages, finds a handler > function, and then calls that, taking the value it returns and sending it > over the reply channel > My thoughts as well.

Re: Django and timezones ... how to initialize a field to now() in the in clients time zone?

2017-01-24 Thread Bernd Wechner
Thanks enormously Andreas! Very helpful. Will peruse at leisure later, but in summary: 1) yes saving in UTC always. 2) hoping to present times on user forms in their local time zone (translate on way to client and again on way back to server so to speak). Knew it can't have been a first time

Validating and cleaning related models ...

2017-01-24 Thread Bernd Wechner
I find myself in a conundrum with related models and related formsets. I'll try and simplify a rather complex set of relations to illustrate the bare bones gist of my issue. Imagine the standard Djnago docs example: class Musician(models.Model): first_name = models.CharField(max_length=50)

interaction between two django app

2017-01-24 Thread Lorenzo Bernardi
Hello, I don't know what is the best approach for the communication between two django applications. We have a website using django and django-cms. We have another application, the "seminar" app for managing some informations like seminars, news, people profiles They have both

Re: Issue with Tutorial pt 5 "Fixing the bug"

2017-01-24 Thread Tim Graham
Correct, you shouldn't declare class QuestionAdmin(...) twice. What problem do you see if you combine those classes? It's unlikely related to your Python version. On Tuesday, January 24, 2017 at 10:45:50 AM UTC-5, John Wall wrote: > > I'm guessing you mean that I have to class calls for

Re: Django Tutorial 2: No changes detected in app 'polls'

2017-01-24 Thread Tim Graham
That's not true. The tutorial should work as stated. Does polls/migrations really not contain 0001_initial.py? On Tuesday, January 24, 2017 at 12:52:20 PM UTC-5, Андрей Воскресенский wrote: > > it need to be installed as 'polls' > > вторник, 24 января 2017 г., 14:34:47 UTC+2 пользователь Luna

Re: Error connecting websocket with Django Channels

2017-01-24 Thread Andrew Godwin
Hi, I can confirm that the current answer on the page, by tovmeod, is the correct one - you must send back acceptance in connect as of channels 1.0. More here: http://channels.readthedocs.io/en/latest/releases/1.0.0.html#websocket-accept-reject-flow Andrew On Tue, Jan 24, 2017 at 8:48 AM,

Re: Django Tutorial 2: No changes detected in app 'polls'

2017-01-24 Thread Андрей Воскресенский
it need to be installed as 'polls' вторник, 24 января 2017 г., 14:34:47 UTC+2 пользователь Luna Tuna написал: > > my polls/models.py is a copy of the tutorials', and the app is under > mysite/settings.py/INSTALLED_APPS as 'polls.apps.PollsConfig'. > > python manage.py makemigrations polls > >

Re: Django-channels and JSON-RPC

2017-01-24 Thread Andrew Godwin
Hi Fabien, My basic idea for an outline would be: * A class than inherits from JsonWebsocketConsumer * That class' receive() method decodes incoming messages, finds a handler function, and then calls that, taking the value it returns and sending it over the reply channel * The user of it would

Error connecting websocket with Django Channels

2017-01-24 Thread Shubham Goyal
Hi, I am trying the basic chat application using django-channels, but somehow web socket fails to connect with django server. I have listed the issue in detail here: http://stackoverflow.com/questions/41817871/websocket-using-django-channels Please have a look. I will highly appreciate it.

Re: Django-channels and JSON-RPC

2017-01-24 Thread Fabien Millerand
alexander, I uploaded some ideas. I think our best call is to extend WebsocketConsumer with some basic Json-RPC rules. I reused some code from this module: https://pypi.python.org/pypi/jsonrpc2 See jsonrpc_test branch on repo. If we wrap it up nicely it should be fairly easy. The last step is

Re: Issue with Tutorial pt 5 "Fixing the bug"

2017-01-24 Thread John Wall
I'm guessing you mean that I have to class calls for QuestionAdmin? I was not able to get the code from the tutorial to work any other way. Might it be some issue with my version of Python? On Tuesday, January 24, 2017 at 6:18:40 AM UTC-5, Melvyn Sopacua wrote: > > On Monday 23 January 2017

Re: Model forms

2017-01-24 Thread Vijay Khemlani
Crispy forms is also good http://django-crispy-forms.readthedocs.io/en/latest/ On 1/24/17, Fred Chevitarese wrote: > Hey! > > I use this app to make my job easier :P > https://github.com/dyve/django-bootstrap3 > > Just install it and follow the instructions ;) > > >

Re: Model forms

2017-01-24 Thread Fred Chevitarese
Hey! I use this app to make my job easier :P https://github.com/dyve/django-bootstrap3 Just install it and follow the instructions ;) Cheers! *"* *São os homens que mais me surpreendem na humanidade. Porque perdem a saúde para juntar dinheiro, depois perdem dinheiro para recuperar a saúde.

Re: Multiple forms in the same template

2017-01-24 Thread schaf . mh
HI sorry I wanted to shorten the code before, to not post too much. Here the code: views.py class MFormsView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView, MFView): template_name = 'temps/cnfg_form.html' form_classes = { 'abc': abcForm, 'md': mdForm, }

Model forms

2017-01-24 Thread JJEMBA KENNETH
Hello Django user, Am a new user and am worndering How can I add a css class to django model forms, like bootstrap classes -- Jjemba Kenneth -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Multiple forms in the same template

2017-01-24 Thread schaf . mh
HI sorry I wanted to shorten the code before, to not post too much. Here the code: views.py class MFormsView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView, MFView): template_name = 'temps/cnfg_form.html' form_classes = { 'abc': abcForm, 'md': mdForm, }

Django Tutorial 2: No changes detected in app 'polls'

2017-01-24 Thread Luna Tuna
my polls/models.py is a copy of the tutorials', and the app is under mysite/settings.py/INSTALLED_APPS as 'polls.apps.PollsConfig'. python manage.py makemigrations polls gives: > > System check identified some issues: > WARNINGS: > ?: (1_8.W001) The standalone TEMPLATE_ > lowing settings into

Re: Issue with Tutorial pt 5 "Fixing the bug"

2017-01-24 Thread Melvyn Sopacua
On Monday 23 January 2017 08:22:28 John Wall wrote: > > class QuestionAdmin(admin.ModelAdmin): > fieldsets = [ and whoops: > class QuestionAdmin(admin.ModelAdmin): You have 2, sir. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django

Re: Multiple forms in the same template

2017-01-24 Thread Melvyn Sopacua
Hello, Assuming the fields issue is resolved. If not, please show the abcForm. On Monday 23 January 2017 08:14:09 schaf...@gmail.com wrote: > I guess I first need to fully understand the Django ModelForm and how > a template can handle two independent forms. Maybe I also have to > change the

Re: Django-channels and JSON-RPC

2017-01-24 Thread Fabien Millerand
I just read that on the "Docs": On*e thing channels do not do, however, is guarantee delivery. If you need > certainty that tasks will complete, use a system designed for this with > retries and persistence (e.g. Celery), or alternatively make a management > command that checks for completion

Re: Django-channels and JSON-RPC

2017-01-24 Thread Alexander Prokhorov
My github name is “prokher”. Would be happy to help. вторник, 24 января 2017 г., 11:00:06 UTC+3 пользователь Fabien Millerand написал: > > Hi, > > I will start implementing something this week (starting today). > I will let you know how things go. > Alexander, I would be happy to share my work

Re: Django-channels and JSON-RPC

2017-01-24 Thread Fabien Millerand
Hi, I will start implementing something this week (starting today). I will let you know how things go. Alexander, I would be happy to share my work and get some feedback/help on this project. Let me know your github username and we can colaborate Cheers Fab Le dimanche 22 janvier 2017 15:18:03