Hi,

First, in answer to your question in the title - yes, normally you
should report bugs like this to Trac, once you are sure you've found a
bug.

> The problem here is:
> 
> 
> If i don't set a context_object_name in my app, the method
> get_context_object_name puts a name based  in the verbose_name_plural
> of my model's name but in the method get_context_data, ithe queryset
> is set twice, first as 'object_list' and then with the generated name.
> Querysets being lazy, this is not really a problem in templates, but
> if I want to serialize that context generated by get_context_data (to
> create a generic view that outputs results in json), I will load the
> data twice and that could be a problem.

I don't see anything that makes me think the data will be loaded twice.
Have you actually seen this happening in practice? Giving a single
QuerySet object two entries in a dictionary doesn't clone it.

> In the edit,py file (django/views/generic) the
> class ModelFormMixin inherits from FormMixin and the
> methods form_invalid from both classes are the same code:
> 
> 
> return self.render_to_response(self.get_context_data(form=form))
> 
> I think the method from ModelFormMixin just should call super from
> FormMixin, like in form_valid, but perhaps this is intentional.

Even better would be to miss out the method altogether. I can't think
why right now, but it is possible that it is intentional - if so a
comment to say why would be better.

Luke

-- 
"My capacity for happiness you could fit into a matchbox without 
taking out the matches first." (Marvin the paranoid android)

Luke Plant || http://lukeplant.me.uk/

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to