Re: Stalled tickets

2019-09-27 Thread ludovic coues
I have seen other open source project handling that with a comment saying the ticket will be closed in a short time. I assume closing with a comment it's fine to reopen if it's still relevant would be fine. Maybe also tagging the tickets with a label "closed as stalled" ? On Fri, Sep 27, 2019,

Re: Extend FAQ with "How do I get Django and my JS framework to work together?"

2019-02-04 Thread ludovic coues
My current job is working on the django backend of a SPA/JS. Truth is, our django does not serve any JS file. The whole SPA is a bunch of static files, served by nginx. Every and only request with a path starting with /api are routed to Django. On Tue, Feb 5, 2019, 04:16 Curtis Maloney On 2/5/19

Re: [Looking for feedback] Make Admin raw_id_fields the default choice for FKs, or project-wide configurable

2019-01-17 Thread ludovic coues
Django's admin default widget for foreign keys is a select. If you try to populate a select elements with 20,000 options, your page take at least a few seconds to load. Probably a minute or two, if it load at all. By configuring your model admin to display the foreign key as a raw_id_fields, you

Re: Database connection retry

2018-12-15 Thread ludovic coues
Are you using runserver in production ? On Sat, Dec 15, 2018, 08:52 Jamesie Pic Hi all, > > Sorry to bump this, but I didn't find another thread, and I'm pretty sure > re-trying the database connection is the sane thing to do. > > Otherwise, Django will remain in failed state after reboot in

Re: A faster paginator for django

2018-12-05 Thread ludovic coues
The preferred way for this kind of scenario is to make a third party package. This let you release new version faster than the Django development cycle and it's super easy to install thanks to tools like pip. Once your solution is stable, if it's popular enough, it could be incorporated into

Re: Pluggable secret key backend

2018-11-10 Thread ludovic coues
I don't see how this would work. For example the session. You take the user cookie. You try to validate with your secret key. That doesn't work because the current key is the new one. With a custom cookie backend, you could check if the old secret could validate the cookie. But you need to

Re: Idea: Allow queryset.get() and queryset.filter() to accept a positional argument for implicit primary key filtering

2018-11-06 Thread ludovic coues
When experimenting with code in the shell, debugging or troubleshooting, I personally tend to do a lot of get. I know some object cause issue so I try to get them to poke them and see what's the problem. When trying to get them, if I have the id, I always try to type Model.objects.get(id).

Re: django.contrib.auth CLI

2018-10-11 Thread ludovic coues
I'm sure your extreme DevOps expertise can find a way to automate the deployment of a pip package. I mean, you are argument about manual step for an automatic step is a straw man. Let's say you make two deployment of your app. One on your system, one on premises on a customer system. You want

Re: ModelForm unique validation is not done right IMHO.

2018-09-24 Thread ludovic coues
First, that's a discussion for the Django user list, not the Django developers one. I would add a clean_book method on the form and use it to check if the user already have a book with that name. For that specific problems, that's the cleanest solution in my opinion. Simply do a

Re: The behavior of QueryDict.get(_key_, _default=None_)

2018-07-19 Thread ludovic coues
This will probably breaking compatibility with previous version of Django, breaking a lot of website in subtle way. Printing a debug message in the log when calling QueryDict.get on key being present more than once sound more reasonable. That should be doable as an third party app but that

Re: App Name

2018-07-12 Thread ludovic coues
That question should be posted on Django user, where people discuss on how to use django to build web site and web application. This list is for improving djnago. Anyway. The first argument of the url tag is the name of the URL you want. The most common way to specify an URL name is with the

Re: GSoC 2018

2018-03-18 Thread ludovic coues
On Sat, 17 Mar 2018, 21:55 Manasvi Saxena, wrote: > Hello Sir, > > I'll give some background. The Django Templating Language was very >> specifically designed to NOT allow putting business logic or allow calling >> arbitrary functions in the template. Jinja2 loosened up that

Re: Hello everyone I'm a new member

2017-12-12 Thread ludovic coues
There is a chapter in the documentation on how to contribute to django. It should answer most of your questions. On 13 Dec 2017 3:10 am, "Asad Ahmed" wrote: > Hello everyone, > I'm new to open source community. I've been working on python and django > framework for few

Re: In-memory queryset

2017-03-07 Thread ludovic coues
This look like a question for django user. The QuerySet API is only an abstraction layer to SQL code. That's why it require a database. If you really don't want to store your object on a filesystem, sqlite support database living only in memory. That's mainly for testing purpose but that could

Time based one time password and django ?

2017-01-15 Thread ludovic coues
Hello, After reading the recent thread on authentification in django, I wondered about the chance of getting a 2-step auth mechanism in django.contrib. Time based one time password, or TOTP, is now part of the RFC 6238. For those who don't know it, it use a shared secret and current time to

Re: Django

2016-11-01 Thread ludovic coues
First, this mail list is for working on the internal of django, not for using it to create website. You are looking for the django user mail list. Second, there is a tutorial on django website [1] and there are other easier to follow and covering more subject, like [2]. [1]

Re: is_valid as property

2016-10-11 Thread ludovic coues
If we choose to move the call to full_clean from errors to is_valid with a deprecation period, maybe we could rename is_valid to validate. is_valid could be kept as a property, raising error if called before validate like error would be after the change. 2016-10-11 17:50 GMT+02:00 Aymeric

Re: is_valid as property

2016-10-11 Thread ludovic coues
+02:00 Sven R. Kunze <srku...@gmail.com>: > Am Dienstag, 11. Oktober 2016 15:03:21 UTC+2 schrieb ludovic coues: >> >> If I remember correctly, form.is_valid do the actual form validation >> and return false in case of error. > > > I don't know what counts as "

Re: is_valid as property

2016-10-11 Thread ludovic coues
If I remember correctly, form.is_valid do the actual form validation and return false in case of error. In your template, you can use {% if form.errors %} to check if the form has any error. It's a dict with field as key and list of errors as value. 2016-10-11 14:52 GMT+02:00 Sven R. Kunze

Re: DEP pre-proposal for a simpler URLs syntax.

2016-10-04 Thread ludovic coues
one could be build next to the old one, rather than on top. This might open the way for third party module providing new way to route request in django. 2016-10-04 14:55 GMT+02:00 Aymeric Augustin <aymeric.augus...@polytechnique.org>: > Hello Ludovic, > > > On 04 Oct 2016, at 14

Re: DEP pre-proposal for a simpler URLs syntax.

2016-10-04 Thread ludovic coues
In my opinion, there is too much question for this DEP. Here is a quick timeline. September 12, Emil Stenström rise a valid criticism, using regex for url routing is a bit too much in 99% of the case. It suggest a syntax similar to the ruby on rails routing syntax. September 13, someone mention

Re: does anyone use models with underscores in the name?

2016-10-03 Thread ludovic coues
I have seen that and so far I haven't found any issue if the underscore is in the middle of the model name. 2016-10-03 18:30 GMT+02:00 Tim Graham : > Ticket #27295 notes that the ORM doesn't work well with models that start > with an underscore (e.g. _UsersGroup). I didn't

Re: Contributing to ORM module

2016-10-02 Thread ludovic coues
There is a list of bug and feature request on the django's tracker https://code.djangoproject.com/query 2016-10-02 14:49 GMT+02:00 : > Hi everyone! > > First of all, I'm not sure that I'm writing in the right place, so excuse me > if this so. > > Second - let me introduce

Re: Django Channels Load Testing Results

2016-09-26 Thread ludovic coues
Monday, September 26, 2016 at 2:25:04 PM UTC-5, ludovic coues wrote: >> >> What you call a pathological case is a small website, running on >> something like cheap VPS. >> >> >> >> 2016-09-26 15:59 GMT+02:00 Chris Foresman <fore...@gmail.com>: >&g

Re: Django Channels Load Testing Results

2016-09-26 Thread ludovic coues
What you call a pathological case is a small website, running on something like cheap VPS. 2016-09-26 15:59 GMT+02:00 Chris Foresman : > Robert, > > Thanks! This really does clear things up. The results were a little > surprising at first blush since I believe part of the

Re: Challenge teaching Django to beginners: urls.py

2016-09-16 Thread ludovic coues
In my opinion, there is two point. First, core django should allow different url resolver. Second, these different url resolver should start as third party package. Without first point, people need to hack django if they want to experiment new kind of resolver. Like one providing typecasting or a

Re: Challenge teaching Django to beginners: urls.py

2016-09-13 Thread ludovic coues
There is third party module providing third party url function. Surlex [1] have been mentionned. But any third party solution will need to provide function compatible with django.conf.urls.url. Line 64 of django/urls/revolvers.py is get_resolver. This function return a RegexURLResolver, using is

Re: Django Rest Framework inside of a Django Project

2016-08-26 Thread ludovic coues
You might get more responses on the django users mailing list. This one is for discussing new feature of the framework, not its usage. 2016-08-26 17:30 GMT+02:00 Sylvain Dégué : > Hi, > > I am building a mobile application and I need a Rest API and a web version > of my

Re: PEP 484 type hinting in Django

2016-08-17 Thread ludovic coues
Dropping support for python 2.7 has been planned for some time. Django 1.11 will be the last one supporting python 2. The following release will be django 2 and will only support django 3.5+. See https://docs.djangoproject.com/en/dev/releases/1.11/ That's what Tim was talking about. You can

Re: I'm looking for a part-time job in Django

2016-08-15 Thread ludovic coues
Developer of Django are working on a voluntary basis, without being paid. If you are interested, you can read https://docs.djangoproject.com/en/dev/internals/contributing/ for more information. 2016-08-14 21:20 GMT+02:00 Uri Even-Chen : > Hi Asif, > > How can I become a

Re: CheckiO Community is looking for more ways to contribute into Open Source

2016-08-12 Thread ludovic coues
There is a section in the django documentation about contributing :) https://docs.djangoproject.com/en/dev/internals/contributing/ 2016-08-12 11:23 GMT+02:00 Alexander Lyabah : > Hi Django developers. > > My name is Alex I’m CEO and founder of CheckiO. I hope I found a

Re: Extend support for long surnames in Django Auth

2016-08-02 Thread ludovic coues
Someone mentioned mysql not supporting nicely string of 255 unicode characters. 2016-08-02 13:42 GMT+02:00 Malcolm Box : > Hi Aymeric, > > I'm sorry that you feel this has devolved to a bikeshedding fest, that > certainly wasn't my intent, and I'd hate to see this issue die.

Re: Extend support for long surnames in Django Auth

2016-07-29 Thread ludovic coues
The W3C have some recommandation on the question. https://www.w3.org/International/questions/qa-personal-names 2016-07-29 17:47 GMT+02:00 Aymeric Augustin : > Hello, > > Indeed, Django’s default limit on last name length doesn’t work well for > Brazilians (at

Re: Joining the "Python 3 Statement"

2016-07-10 Thread ludovic coues
The 1.11 release note already tell clearly it will be the last version of django supporting python2. 2016-07-10 16:17 GMT+02:00 Sam Willis : > As far as I can tell the only place where Django's Python 2.x deprecation is > stated is here

Re: Fate of sql* management commands

2016-06-22 Thread ludovic coues
2016-06-22 14:13 GMT+02:00 Marcin Nowak : > > The reason of removing two differenct ways of managing db schema is clear > for me. I just do not understand removing the tool without providing decent > replacement for it. For example, CBV generics were replacement for FBV

Re: [RFC] Test methods filtering on tests run

2016-05-17 Thread ludovic coues
I might be saying something stupid, but rather than filtering test, would it not be better to have a flag to rerun all the test that failed in the previous run ? So the command would always be the same for testA, testB or even both, and might be more user-friendly if there is a bunch of test