Am Sonntag, 16. September 2007 schrieb Collin Grady:
> Do you actually have any Abbreviation objects?
>
> If you don't tell the view to allow empty results, it'll 404 if it has
> nothing to show :)

Yes, this was the problem, thanks! However I ran into the next problem just 5 
minutes later.

I have an template that is used for this generic view:

{% if Abbreviation_list %}
    <ul>
    {% for abbr in Abbreviation_list %}
        <li>{{ abbr.abbreviation }}</li>
    {% endfor %}
    </ul>
{% else %}
    <p>No abbreviations are available.</p>
{% endif %}

That just gives: "No abbrevations...". If I remove the if clause there is just 
<ul> </ul> in the HTML source code.

But there are objects:

[EMAIL PROTECTED] ~/xgm $ ./manage.py shell
Python 2.4.4 (#1, May 13 2007, 13:02:35)
[GCC 4.1.1 (Gentoo 4.1.1-r3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from xgm.AbbrDB.models import *
>>> Abbreviation.objects.all()
[<Abbreviation: ABC>, <Abbreviation: DEF>]

Everything is unchanged compared to my previous post.

Thanks,

Florian


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to