Leverage Django 3.1+ async views to implement SSE

2020-08-22 Thread Benoit Blanchon
ckoverflow.com/a/55522953/1164966>. Still, I would accept any solution based on asynchronous views. I opened a bounty on stack-overflow <https://stackoverflow.com/q/63316840/1164966>, but so far, no viable solution was proposed. Does anyone know how we could leverage async views to im

Re: FormSet.is_valid() raises ValidationError

2019-11-04 Thread Benoit Blanchon
se an exception on the server. For example, he could write a loop can call "curl -X POST" repeatedly, which would flood the admins with "Internal Server Error" emails. This is possible because BaseFormSet.is_valid() raises an exception when it should return False as a regular f

FormSet.is_valid() raises ValidationError

2019-10-29 Thread Benoit Blanchon
think this is incorrect: BaseFormSet.is_valid() should catch this exception and return False; otherwise, it allows a malicious user to cause an error 500 by tampering the management form. Best regards, Benoit Blanchon (Django version: 2.2.6) -- You received this message because you are subscribed

Re: ResultSet with query on multiple models

2019-08-24 Thread Benoit Dupont
I think I have figured it out. I have to play with models.Prefetch() to restrict the results from the prefetch_related() Can someone confirm this is the right way to do it ? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

ResultSet with query on multiple models

2019-08-23 Thread Benoit Dupont
Hello, I've played a lot of time with Django and it's a great tool for basic query but I don't figure out how to play with Django to do a query spanning between a lot of models. This is the query I do to display all Animals and their corresponding Vaccines with Encounter.status 'in-progress'

Setting Django

2018-03-27 Thread Benoit EVRARD
Hello, I'm new to this Django Framework. By the way, is it a Framework? I have no time to read all of the posts and tutos. Django seems to interpret python's coding am I right? I need to adapt a Zend Framework. Am I in the wrong path here? Best, Be -- You received this message because you are

Testing view's get_context_data(): why does MultipleObjectMixin.get_context_data() require "object_list" in kwargs?

2013-02-13 Thread benoit . bryon
Hi, While writing tests for views, I discovered the following code and wondered whether it is a feature or a potentially bad pattern... * BaseListView sets self.object_list: https://github.com/django/django/blob/ec469ade2b04b94bfeb59fb0fc7d9300470be615/django/views/generic/list.py#L137 * Then B

Django 1.5 custom User model error. "Manager isn't available; User has been swapped"

2012-11-26 Thread Benoit Petit
Hi, I extend the django user model as described in the dev doc. I wan't to keep most of the original User model features so I extend the AbstractUser class. I've defined in settings.py: AUTH_USER_MODEL = 'myapp.CustomUser' My user class: class CustomUser(AbstractUser): custom_f

Re: Accessing Backend DB for UI

2012-06-05 Thread Benoit Perdu
Is there a database (SQLite, MySQL, PostGreSQL, ...) at your backend, or is it an abstraction layer made in Perl? If you have a databse, why not access it directly with Django --You would need to build your model to fit, and set the username to one the DB accepts, but this looks like the clean

Re: Questions on markdown

2011-07-06 Thread Benoit Perdu - TransMékong
Leo, If you want to wrap without the end of a paragraph, you should end your lines with 2 or more spaces then do a single new line. This is as per the standard Markdown behaviour. Also, make sure you parse all the text you need parsed in one go, not line by line. All the best Benoit On 11-07

Re: Creating a common URL prefix?

2010-10-25 Thread Benoit
Hi, Django-localeurl does something like this. I've successfully implemented it in several projects. http://bitbucket.org/carljm/django-localeurl/ http://pypi.python.org/pypi/django-localeurl/1.4 Benoit Clennett-Sirois On Mon, Oct 25, 2010 at 8:54 AM, Oliver Beattie wrote: > Hi al

Re: Django & Couchdb ??

2009-06-14 Thread Benoit Chesneau
Just to complete (I see you already got it) : there is now the couchdbkit extension : http://bitbucket.org/benoitc/couchdbkit/ with documentation here : http://couchdbkit.org/docs/api/couchdbkit.ext.django-module.html - benoît --~--~-~--~~~---~--~~ You received

[ANN] couchdbkit extension for django

2009-06-14 Thread Benoit Chesneau
Hi all, Quick mail to let you know I released a django extension for couchdbkit that will allow you I hope to use easily use CouchDB in your django applications. It suppport multiple db, dynamic documents and automatic form generation from a Document object (like ModelForm). Code is for now on bi

Djangobook Revisions for 1.0 release

2008-08-31 Thread Benoit
the sane name, so there's no need for me to repeat them alongside the unanimous disapproval found in that chapter as well. I appreciate any responses. - Benoit --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &q

Model structure advice for "shared" relation between class

2008-04-18 Thread Benoit Caron
.Model): title = CharField(...) text = CharField(...) host = ForeignKey(Host, null=True) network = ForeignKey(Network, null=True) etc. Thanks in advance for any help, sorry if this is something fundamental I did'nt catch Benoit Caron --~--~-~--~~~

django-authopenid version 0.9 released

2007-11-18 Thread Benoit Chesneau
Hi all, Major bump to django-authopenid. The main change is that you don't need any more to rely on django-openid. Main reason for this is that I can't distribute an application with a patch on another. Application should be pluggable more easily. Other changes are improvement in code. As yousu

Re: Django authentification application with openid using django auth contrib

2007-11-13 Thread Benoit Chesneau
Version 0.2 : - include new patch for django_openid 2.0 - clean code. New username_control decorator - fix yadis import - urls localization You could downlad it here : http://django-authopenid.googlecode.com/files/django_authopenid-0.2.tar.gz Documentation : http://code.google.com/p/django-autho

[new app] Django authentification application with openid using django auth contrib

2007-11-09 Thread Benoit Chesneau
Hi all, Finally released (with improvements) the application I use on friendsnippets to manage openid authentification. You could find it here : http://code.google.com/p/django-authopenid/ This application allow a user to connect to you website with : * legacy account : username/password

Re: new app to manage comments

2007-09-25 Thread Benoit Chesneau
On Sep 25, 2:39 pm, "Benoit Chesneau" <[EMAIL PROTECTED]> wrote: > Hi all, > > I just opensourced comments today for all, let me know what do you > think about it and how to improved it. It's under ISC License. > > Comments is a django app

new app to manage comments

2007-09-25 Thread Benoit Chesneau
Hi all, I just opensourced comments today for all, let me know what do you think about it and how to improved it. It's under ISC License. Comments is a django application used on Friendsnippets (http://www.friendsnippets.com) to let members to add their comments to snippets. It works with curre

Re: The setlang view

2007-09-23 Thread Benoit Chesneau
On 9/23/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > I wonder what others have been doing? I might as well copy & hack the > setlang function and make it accept GET requests, but that's not > something I want to make a habit. > > You can just do a middleware tha

Re: django-voting and django-tagging error

2007-08-30 Thread Benoit Chesneau
If you use trunk. problem was fixed. - benoît On 8/30/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 8/30/07, Kelsey Ruger <[EMAIL PROTECTED]> wrote: > > > > I just checked out the latest versions of django-voting and django- > > tagging. When attempting a syncdb I get the following error -

Re: Django, python 2.5 and macports 1.5

2007-07-20 Thread Benoit Chesneau
after deinstalling old one. I should open a bug about it one day... Benoit. On 7/20/07, lars <[EMAIL PROTECTED]> wrote: > > Hi all, > > yesterday I tried to install django on my macbook. Since I wanted to > have a more recent python interpreter I installed the one from > macpo

many2many with newforms

2007-01-25 Thread Benoit Chesneau
Hi, I have a models with a many2many field. I try to use it with MultiChoiceField in newforms to.? But it doesn't work. I hve this error : Exception Type: TypeError Exception Value:'categories' is an invalid keyword argument for this function args () f kwargs {'categories': [u'