ModelForm unique validation is not done right IMHO.

2017-10-07 Thread Todor Velichkov
I will best explain what I mean with an example. Lets say we have a simple model called Book. class Book(models.Model): user = models.ForeignKey(User) name = models.CharField(max_length=255) class Meta: unique_together = ('user', 'name') so `Books` are linked to users, and

PostgreSQL Partial Indexes package

2017-10-07 Thread Mattias Linnap
Hi django-developers, I have written a package that implements PostgreSQL and SQLite partial indexes on top of the new class-based indexes: https://github.com/mattiaslinnap/django-partial-index The most common use case is partial unique constraints, but I have a few projects where non-unique pa

Re: ModelForm unique validation is not done right IMHO.

2017-10-07 Thread Florian Apolloner
I think the current behaviour is correct. Django shouldn't make any assumptions about fields not in the form since it doesn't know what will happen… In that sense I disagree with the statement: > From my point of view when I define a ModelForm I imagine that I have to only explain what the user

Re: Ticket #28609 - Making REQUEST_URI available in runserver

2017-10-07 Thread Shai Berger
Hi Jay, First, I'd like to say that your post was very nicely done. You did not miss any conventions as far as I could see. I believe the only reason you got no responses so far is that the issue is relatively fringe, and your message was relatively long. For the subject matter, though, it see

Re: ModelForm unique validation is not done right IMHO.

2017-10-07 Thread Todor Velichkov
Thank you for the replay Florian, I will think about what you said that Django shouldn't make any assumptions about fields outside the form, but my intuition tells me that there are more staff which we could be retrieved from the ModelForm's. Some of my initial thoughts: If the ModelForm does

Re: Refactoring the autoreloader

2017-10-07 Thread Tom Forbes
Thanks for the feedback! Watchdog does include a stat watcher, and I think we can delegate to that. Currently we turn on the file system notifications if the library is available, but we should add a '--stat' flag to disable this it you are running on filesystems that don't support this. At which p

Re: Refactoring the autoreloader

2017-10-07 Thread Aymeric Augustin
Hello Tom, I think the PR is on the right track. Now it needs to be taken beyond the "proof of concept" stage. Once you have code, docs, and if possibly some tests — currently there are few due to the difficulty of testing auto reloading, especially edge cases — for steps 1 and 2, I can review

Fellow Report - October 7, 2017

2017-10-07 Thread Tim Graham
Triaged --- https://code.djangoproject.com/ticket/28667 - Documentation for extending UserCreationForm doesn't work with UserAdmin (accepted) https://code.djangoproject.com/ticket/28669 - bool(ungettext_lazy('%(value)d blah', '%(value)d blahs', 'value')) returns False (duplicate) https

django project avoid reload page where work algorithm

2017-10-07 Thread Xristos Xristoou
I have a website where the user can be put three numbers on my html template and get some results from my personal mathematical algorithm. the result save at user personal table on my database and can see in specific tab in my website. my problem is where the algorithm to calculate result may

Re: django project avoid reload page where work algorithm

2017-10-07 Thread Tom Forbes
This is the mailing list for the development of Django itself, I would post this to the Django users mailing list instead if you want any answers to your question. It sounds like an ideal use case for celery though. On 8 Oct 2017 01:41, "Xristos Xristoou" wrote: I have a website where the user