Re: Django bugfix release: 2.1.1

2018-09-01 Thread Paulo Maciel
pip install Django==2.1.1 Could not find a version that satisfies the requirement Django==2.1.1 Em sexta-feira, 31 de agosto de 2018 05:52:28 UTC-3, Carlton Gibson escreveu: > > Details are available on the Django project weblog: > > https://www.djangoproject.com/weblog/2018/aug/31/bugfix-releas

IntegrityError when cascading delete, and there post_delete that creates a new object.

2016-04-26 Thread Paulo Maciel
Hi, I have a problem that already published in Django users, but did not find the solution to this. When deleted in cascade and a relationship has a post_delete that creates an entry to a deleted object, an error occurs and the exception does not work. Please look at this https://groups.googl

Re: Refactor year, month, day lookups?

2016-01-22 Thread Paulo Maciel
+1 Em quarta-feira, 25 de março de 2015 01:24:44 UTC-3, Josh Smeaton escreveu: > > Hi, > > Firstly (and least importantly) opening a PR makes it a lot easier to > review code, especially when there are lots of commits. A [WIP] pull > request is common and useful. If you get a chance, you should

Annotation failure (Combining multiple aggregations)

2015-12-04 Thread Paulo Maciel
Combining multiple aggregations with annotate() will yield the wrong results , as multiple tables are cross joined. Due to the use of LEFT OUTER JOIN, duplicate records will be generated if some of the joined tables contain more records than the other

Proposal: add new template tag "age"

2015-11-09 Thread Paulo Maciel
My proposal is to add a new template tag "age": {{ birthday|age }}. I think it is a common need for many users know the age from a date. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from

Re: Why leave explicit null=True when blank is True in IntegerField, DateField etc?

2015-09-21 Thread Paulo Maciel
Why confused? It's optional, if the developer wanna put null=True, he could. I don't think need to be putting null = True, this is redundant. If this is a standard behavior, you need not be explicit. I think this should be optional, by default these fields should always be null=True implicitly. D

Re: Making max_length argument optional

2015-09-21 Thread Paulo Maciel
+1 max_length optional Em quarta-feira, 29 de julho de 2015 01:27:59 UTC-3, Aron Podrigal escreveu: > > Hi, > > I am using postgresql and I prefer my VARCHAR columns not to have a length > limit. Is there any particular reason why max_length arg to fields is > required. If for compatibility wi

Why leave explicit null=True when blank is True in IntegerField, DateField etc?

2015-09-16 Thread Paulo Maciel
It would be better if IntegerField, DateField, etc did not have to leave explicit null=True when blank is True. In my opinion it might look like: class Abc(models.Model): number = models.IntegerField(blank=True) # doesn't need leave explicit null=True, it's should be default if blank is T

Possible bug when filter per month on a variable generated by annotate

2015-09-07 Thread Paulo Maciel
Possible bug when filter per __month on a variable generated by annotate p = Person.objects.annotate( main_date=Case( When(ok=True, then='date_a'), default=F('date_b'), output_field=DateField() ) ) a = p.filter(main_date__month=9) print(a) IndexError at / tuple

New function to sort words with accents.

2015-05-05 Thread Paulo Maciel
I am returning the query Something.objects.all().order_by(Lower('name')) but the order is not respecting names that start with accent, causing these results appear at the end of ordering. We need a function to ignore accents and order correctly names with accents, as well as function Lower trea

Re: Proposal to improve the formset

2015-03-27 Thread Paulo Maciel
ads (if an error occurs) the inlineform previously ignored would return hidden in my template. Em sexta-feira, 27 de março de 2015 21:31:16 UTC-3, Russell Keith-Magee escreveu: > > Hi Paulo, > > On Sat, Mar 28, 2015 at 8:12 AM, Paulo Maciel > wrote: > >> I started workin

Proposal to improve the formset

2015-03-27 Thread Paulo Maciel
I started working with formset and found half cast, for example, when configuring a formset with min_num = 1, django requires that the first form of the formset (form-0) is completed, I see this as a bug, it should check for some form completed and validated, should not require that the form-0

Re: Error accessing the table from an app with label changed

2014-12-10 Thread Paulo Maciel
I put in *db_table* the table name with the new label prefix and it works, it would be better to automatically identify the new name label created by AppConfig. This seems to be a bug Em quarta-feira, 10 de dezembro de 2014 17h07min15s UTC-2, Paulo Maciel escreveu: > > I created an a

Error accessing the table from an app with label changed

2014-12-10 Thread Paulo Maciel
I created an app and using AppConfig I changed the label to another name (abc to my_abc). The migration was successful and the table was created with the label prefix. But when I access the page, Django emits an error that is trying to access the table without taking into account that has chang