Saturday, October 15, 2011

Re: Don't understand still

> Unfortunately, you have received a lot of very bad advice in this thread,
> for which I can only apologise on behalf of Django-users ...
>
> The references to your custom Managers are misleading. Although it's true
> that you don't need them, because they're not changing anything, you aren't
> in fact breaking anything by having them - just defining them with a "pass"
> doesn't, as some people apparently think, mean that they now have no content
> - of course it doesn't, because you inherit from models.Manager, soo you'll
> have all the default code of that class. Still, as I say, because you don't
> change anything, you don't need them.

I commented them all out.

> The main weird thing in the code you have posted is these two lines in the
> CampPeople model:
>
>     docall = models.BooleanField(True)
>     called = models.BooleanField(False)
>
> Now, the first parameter to a model field (apart from ForeignKeys) is the
> verbose name - ie what appears as the prompt when you create a form based on
> that model. So it seems you have True and False as the verbose names, which
> I'm sure isn't what you want - but I'm not certain what it is you *do*
> intend here. Are you hoping that these will be the default values? If so,
> you need to use the `default` argument:
>
>     docall = models.BooleanField(default=True)
>     called = models.BooleanField(default=False)
>
> Does that help at all?

Unfortunately not, doesn't help. :-(

> You might also try putting some debugging into your template to see if
> you're getting the results you think you are:
>
>     {% for piplok in camppeople %}
>         {{ piplok }}
>         ...

Yes, I receive people names for example, not an empty dataset.

Regards,

Piotr Hosowicz

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate