Re: Upgrade from build 4454 to 4463 induced problem in template

2007-02-08 Thread gordyt

Thanks Michael!

I just diff'ed all the changes between the two revisions in question
and they are truly minor.  I know think that the new revision is just
reporting an error that was being glossed over silently before.  And I
never knew about it because, in spite of the error, everything
functioned perfectly.

Here is what I was doing...  In my view I was "piggy-backing" an
attribute on a Queryset object.  Here is an example... First I created
the queryset...

belongs_to = Customer.objects.filter(associated_with=object_id)

Then, if that part of the GUI was supposed to be expanded so that they
entities that this customer belonged to where to be shown, I was doing
this in the view:

belongs_to.expanded=True

Now in my template I checked for that condition:

{% if belongs_to,expanded %}
... display stuff here ...
{% endif %}

Well to fix this I just created a new variable "belongs_to_expanded",
added that to the extra_context and updated the template accordingly.
Had to do the same for an "owns.expanded"...

That fixed it in the current (4463) revision.  I had mistakenly
assumed that there was a problem in that revision because I had been
running this same code through many other revisions with no errors or
problems.

Interesting, though!

--g


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



Re: Upgrade from build 4454 to 4463 induced problem in template

2007-02-08 Thread Michael Radziej

gordyt:
> Howdy Folks!
> 
> I have been running with trunk revision 4454.  I just updated to
> revision 4463 and a bit of code that has never shown any problems is
> now broken.. :-(

That was a bug, but it has been fixed in the meantime. Just make
another update ;-)

Michael


-- 
noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg -
Tel +49-911-9352-0 - Fax +49-911-9352-100

http://www.noris.de - The IT-Outsourcing Company

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