Re: FOR template tag improvement

2011-03-29 Thread Vinicius Mendes
I think it's not that pythonic as it's just another syntax to do a thing that we are already able to do with the current syntax. -1. -- Vinicius Mendes Globo.com On Tue, Mar 29, 2011 at 9:19 PM, Alex Gaynor wrote: > > > On Tue, Mar 29, 2011 at 7:19 PM, Russell Keith-Mage

Re: get_object_or_404 hook

2011-06-02 Thread Vinicius Mendes
You can always create your own convenience method. Atenciosamente, Vinicius Mendes Engenheiro de Computação Globo.com On Fri, Jun 3, 2011 at 12:30 AM, Justin Holmes wrote: > For every convenience method, there are always ways to make it even more > convenient. > > I think that

Option to disable messages in auth context processor

2009-02-05 Thread Vinicius Mendes
Hi guys, I didn't like the messages buit-in contrib/auth application. That's becouse of two points: - It don't give the ability to send messages to anonymous users (I saw that it is one of the planned features for 1.1); - There's no way to distinguish the messages. For example: I like my success m

Cache related values without needing to hit database twice

2009-03-10 Thread Vinicius Mendes
I think ORM should have some kind of caching. For example, in docs[1], when we do: >>> e = Entry.objects.get(pk=1) >>> e.blog # Hits database >>> e.blog # Don't hit database But let's imagine we have a third model named Author: class Author(models.Model): name = models.CharField(max_length=5

Changeset 10219 does not fix #9587

2009-03-31 Thread Vinicius Mendes
In the ticket description, the user says that he is using inlineformset_factory, so do I. The changeset only fixes the FormSet. ModelFormSet and InlineFormSet are still bugged. In the methods save_new_objects and save_existing_objects, you have to check if the form is marked for deletion, if so, de

i18n for permissions names in auth

2009-04-07 Thread Vinicius Mendes
I was thinking that it would be a good feature if the names of the auth permissions could be internationalizated. For example, instead of storing 'Can add user' in database, can store something like 'Can add %(model_verbose_name)s'. And then internationalize it for the user and put the model name i

Re: Cache related values without needing to hit database twice

2009-03-11 Thread Vinicius Mendes | meiocodigo.com
AM, Vinicius Mendes wrote: > > ... > > > What do you think in saving the author value in the blog instance if it is > > achieved through the author instance? It's something like telling blog who > > is his author in the moment you are retrieving it from the author. >

Re: Changeset 10219 does not fix #9587

2009-03-31 Thread Vinicius Mendes | meiocodigo.com
't have a cleaned_data attr, so I get it from the field, and check it. All the changes were made in the django/forms/models.py In the methods save_existing_objects and save_new_objects. On Mar 31, 2:35 pm, Alex Gaynor wrote: > On Tue, Mar 31, 2009 at 1:32 PM, Vinicius Mendes wrote: > &g

Re: Changeset 10219 does not fix #9587

2009-03-31 Thread Vinicius Mendes | meiocodigo.com
lex Gaynor wrote: > On Tue, Mar 31, 2009 at 1:39 PM, Vinicius Mendes | meiocodigo.com < > > > > vbmen...@gmail.com> wrote: > > > I didn't understand. Line 216 is the docstring: > > > """ > > Returns True if form.errors is empty for

Re: Changeset 10219 does not fix #9587

2009-03-31 Thread Vinicius Mendes | meiocodigo.com
Here is the problem demonstration: http://dpaste.com/21801/ On Mar 31, 3:06 pm, Alex Gaynor wrote: > On Tue, Mar 31, 2009 at 1:55 PM, Vinicius Mendes | meiocodigo.com < > > > > vbmen...@gmail.com> wrote: > > > Look at this link: > > >http://code.django

Re: Changeset 10219 does not fix #9587

2009-03-31 Thread Vinicius Mendes | meiocodigo.com
3:35 pm, Joseph Kocherhans wrote: > On Tue, Mar 31, 2009 at 12:32 PM, Vinicius Mendes wrote: > > > In the ticket description, the user says that he is using > > inlineformset_factory, so do I. The changeset only fixes the FormSet. > > ModelFormSet and InlineFormSet are

Re: Changeset 10219 does not fix #9587

2009-03-31 Thread Vinicius Mendes | meiocodigo.com
It seems to be ok! Thanks On Mar 31, 4:59 pm, Joseph Kocherhans wrote: > On Tue, Mar 31, 2009 at 1:57 PM, Vinicius Mendes | meiocodigo.com < > > > > vbmen...@gmail.com> wrote: > > On Mar 31, 3:35 pm, Joseph Kocherhans wrote: > > > On Tue, Mar 31, 2009 at