Gregory,
Not only is it not practical in Django, it's not a realistic solution
using any framework.
There is no "machine ID" that is exposed to a web site, and originating IP
addresses completely fails for all people accessing your site from behind a
NAT box or other similar functional d
Fellipe,
In addition to the permissions_required variable, I believe you also need
to include the PermissionsRequired mixin in your class definition:
https://docs.djangoproject.com/en/2.2/topics/auth/default/#the-permissionrequiredmixin-mixin
Ken
On Tuesday, May 28, 2019 at 5:54:39 PM UTC-4, F
We deal with a similar rate of data acquisition, and have taken a different
approach. (We get, on average, about 10,000,000 UDP messages / day)
We have a very small UDP listener (about 50 lines of Python 3 code), and
_all_ it does is receive the message and dump it into a Celery queue. We
then
Nick,
A null string (string with length 0) is _not_ the same as a null field
(no string). The two are distinct, and (can) serve two very different
functions.
Take a look at this for some more detailed
information:
https://softwareengineering.stackexchange.com/questions/32578/sql-empty-s
Hi Robin,
I can't speak to any generalized situations, or what might be considered
"best practices" or most optimal.
What I can say is that we have gone with the single websocket connection
for each client - whether it's a real person at a browser or an
application. All our communications thro
ve the source as a management command (as it is
> now), and just run python manage.py source through supervisor?
>
>
> On Sunday, 1 April 2018 13:16:38 UTC+1, Ken Whitesell wrote:
>
> > > We set up all our Django-related processes as a group
> unde
We set up all our Django-related processes as a group under supervisor.
This includes our celery-based processes. (We have some long-running
tasks that are kicked off by the web site.) By setting it up as a group,
we can manage all the different processes as a set.
Whether or not that's the "b
Taking a stab at this - I believe the original problem may be here:
channel_layer.group_send(
settings.CHANNEL_GROUP,
{"type": "epics.message", "text": "Hello World"},
)
Your updateData method is a synchronous method. However,
channel_layer.group_send is an asynchronous me
And while we're at it, I'm going to toss out another opinion.
I've found it extremely beneficial _for me_ to not try to relate channels
2.0 to channels 1.1. I'm approaching it as if I'm learning about a
completely separate package - working from a clean slate so-to-speak.
Ken
On Sunday, Februa
In so far as you are talking about background worker tasks, you are correct.
But those statements do not pertain to a websocket consumer that accepts
connections from a browser. You can run an application without ever
creating a worker task. (Again, I'll refer you to the channels-examples app
f
Before I get to the guts of my answer, I'd suggest you get Andrew Godwin's
"channels-examples" application and read it completely until you believe
you understand everything that it's doing.
(https://github.com/andrewgodwin/channels-examples)
Now, to the extent of my understanding, the "Channel
One of the issues is here:
if request.method == 'GET':
song_name = request.GET.get('name', "Error")
songs = self.model.objects.filter(name__icontains=song_name)
else:
songs = self.models.all()
return render(request, self.template_name, {'s
I'm going to take a stab at this - with the warning that I'm extremely
uncertain that I'm anywhere close to being correct, but I'm hoping that I'm
at least close enough that it might give you some clues.
So where I think the issue may be is that you're trying to do a "self.send"
from a worker t
uot;.cancel()" on it (and remember, you
> can put it on `self` if you need to keep a reference).
>
> To make a task, just do:
>
> loop = asyncio.get_event_loop()
> self.task = loop.create_task(coroutine_function())
>
> Hope that helps!
>
> Andrew
>
> On
TLDR: Is there a way to use the call_later function within a worker task?
(Or am I just looking at this issue the wrong way?)
Software - Python 3.6, Django 2.0.2, Channels 2.0.2, trying to run this on
either / both Windows 10 and Ubuntu 17.10 if it matters
Longer version - I'm having surprising
15 matches
Mail list logo