See also
https://code.djangoproject.com/ticket/27786
I attempt to make file storage behavior dependent on the current user.
(In fact, I attempted to store the ID of the uploader of a given file
into the database, so that other users could not list or delete this
file. Also I tried to store the
:10 PM UTC+2, Victor Porton wrote:
>
> See also
> https://code.djangoproject.com/ticket/27786
>
> I attempt to make file storage behavior dependent on the current user.
> (In fact, I attempted to store the ID of the uploader of a given file
> into the database, so that other
I have implemented something like this:
https://bitbucket.org/portonv/composite-fields
(I did my implementation before reading my thread.)
Please feel free to use and modify my code.
Well, now I should read this thread and
About https://github.com/django/channels
In the past I dealt with another Python WebSocket engine (unrelated to
Django). The connection was breaking after a timeout. I solved this problem
adding:
sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
sock.setsockopt(socket.SOL_TCP,
In https://code.djangoproject.com/ticket/31239 I proposed to create
QueryDictKeyError derived from MultiValueDictKeyError and raise this
exception on a missing parameter in request.GET and request.POST.
It is to be done to handle error in user data easily:
try:
x = request.GET['x']
except
t;]
ifnotall(k inrequest.GET.keys()fork inrequired):
returnMyErrorResponse(...)
|
I've used the latter approach if I have required parameters in a
GET/POST and I'm not using forms. I just adding the check to a base
view and having required
be an attribute
On Sunday, 9 February 202