Re: ManyToMany container with templating

2010-07-06 Thread Rishtastic
Upgrading to 1.2.1 fixed this issue.

Thanks for the help Tom.

On Jul 6, 3:18 pm, Rishtastic  wrote:
> Looks like there is a larger problem with my django..
>
> I literally copy and pasted
>
> "{% if "bc" in "abcdef" %}
>   This appears since "bc" is a substring of "abcdef"
> {% endif %}"
>
> into my template and I still get the "if statement improperly
> formatted" error message
>
> On Jul 6, 3:15 pm, Rishtastic  wrote:
>
>
>
> > Thanks Tom,
>
> > I am aware of the in operator but unfortunately it's not working in
> > the context of comments.readers.all
>
> > I get an error, "if statement improperly formatted" but it is properly
> > formatted...
>
> > Any other suggestions?
>
> > On Jun 30, 11:30 am, Tom Evans  wrote:
>
> > > On Wed, Jun 30, 2010 at 4:15 PM, Rishtastic  wrote:
> > > > Bump?
>
> > > > Sorry guys - need some help with this.
>
> > > > On Jun 29, 5:27 pm, Rishtastic  wrote:
> > > >> Hi all,
>
> > > >> I'm trying to do
>
> > > >> foo is a User auth object
> > > >> comments.readers is a ManyToMany field that links back to the User
>
> > > >> I can iterate just fine by using
> > > >> {% for foo in comments.readers.all %}
>
> > > >> {% endfor %}
>
> > > >> But I want to do this:
>
> > > >> {% if foo in comments.readers.all %}
> > > >> do stuff here
> > > >> {% endif %}
>
> > > >> is this possible?
>
> > >http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#in-operator
>
> > > HTH
>
> > > Tom

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



Re: ManyToMany container with templating

2010-07-06 Thread Rishtastic
Looks like there is a larger problem with my django..

I literally copy and pasted

"{% if "bc" in "abcdef" %}
  This appears since "bc" is a substring of "abcdef"
{% endif %}"

into my template and I still get the "if statement improperly
formatted" error message

On Jul 6, 3:15 pm, Rishtastic  wrote:
> Thanks Tom,
>
> I am aware of the in operator but unfortunately it's not working in
> the context of comments.readers.all
>
> I get an error, "if statement improperly formatted" but it is properly
> formatted...
>
> Any other suggestions?
>
> On Jun 30, 11:30 am, Tom Evans  wrote:
>
>
>
> > On Wed, Jun 30, 2010 at 4:15 PM, Rishtastic  wrote:
> > > Bump?
>
> > > Sorry guys - need some help with this.
>
> > > On Jun 29, 5:27 pm, Rishtastic  wrote:
> > >> Hi all,
>
> > >> I'm trying to do
>
> > >> foo is a User auth object
> > >> comments.readers is a ManyToMany field that links back to the User
>
> > >> I can iterate just fine by using
> > >> {% for foo in comments.readers.all %}
>
> > >> {% endfor %}
>
> > >> But I want to do this:
>
> > >> {% if foo in comments.readers.all %}
> > >> do stuff here
> > >> {% endif %}
>
> > >> is this possible?
>
> >http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#in-operator
>
> > HTH
>
> > Tom

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



Re: ManyToMany container with templating

2010-07-06 Thread Rishtastic
Thanks Tom,

I am aware of the in operator but unfortunately it's not working in
the context of comments.readers.all

I get an error, "if statement improperly formatted" but it is properly
formatted...

Any other suggestions?

On Jun 30, 11:30 am, Tom Evans  wrote:
> On Wed, Jun 30, 2010 at 4:15 PM, Rishtastic  wrote:
> > Bump?
>
> > Sorry guys - need some help with this.
>
> > On Jun 29, 5:27 pm, Rishtastic  wrote:
> >> Hi all,
>
> >> I'm trying to do
>
> >> foo is a User auth object
> >> comments.readers is a ManyToMany field that links back to the User
>
> >> I can iterate just fine by using
> >> {% for foo in comments.readers.all %}
>
> >> {% endfor %}
>
> >> But I want to do this:
>
> >> {% if foo in comments.readers.all %}
> >> do stuff here
> >> {% endif %}
>
> >> is this possible?
>
> http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#in-operator
>
> HTH
>
> Tom

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



Re: ManyToMany container with templating

2010-07-06 Thread Rishtastic
Right, I am aware of the "in" operator...but it is not working in the
context of readers.all

foo is the user object

Any suggestions?

On Jun 30, 11:30 am, Tom Evans  wrote:
> On Wed, Jun 30, 2010 at 4:15 PM, Rishtastic  wrote:
> > Bump?
>
> > Sorry guys - need some help with this.
>
> > On Jun 29, 5:27 pm, Rishtastic  wrote:
> >> Hi all,
>
> >> I'm trying to do
>
> >> foo is a User auth object
> >> comments.readers is a ManyToMany field that links back to the User
>
> >> I can iterate just fine by using
> >> {% for foo in comments.readers.all %}
>
> >> {% endfor %}
>
> >> But I want to do this:
>
> >> {% if foo in comments.readers.all %}
> >> do stuff here
> >> {% endif %}
>
> >> is this possible?
>
> http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#in-operator
>
> HTH
>
> Tom

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



Re: ManyToMany container with templating

2010-06-30 Thread Tom Evans
On Wed, Jun 30, 2010 at 4:15 PM, Rishtastic  wrote:
> Bump?
>
> Sorry guys - need some help with this.
>
> On Jun 29, 5:27 pm, Rishtastic  wrote:
>> Hi all,
>>
>> I'm trying to do
>>
>> foo is a User auth object
>> comments.readers is a ManyToMany field that links back to the User
>>
>> I can iterate just fine by using
>> {% for foo in comments.readers.all %}
>>
>> {% endfor %}
>>
>> But I want to do this:
>>
>> {% if foo in comments.readers.all %}
>> do stuff here
>> {% endif %}
>>
>> is this possible?
>

http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#in-operator

HTH

Tom

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



Re: ManyToMany container with templating

2010-06-30 Thread Rishtastic
Bump?

Sorry guys - need some help with this.

On Jun 29, 5:27 pm, Rishtastic  wrote:
> Hi all,
>
> I'm trying to do
>
> foo is a User auth object
> comments.readers is a ManyToMany field that links back to the User
>
> I can iterate just fine by using
> {% for foo in comments.readers.all %}
>
> {% endfor %}
>
> But I want to do this:
>
> {% if foo in comments.readers.all %}
> do stuff here
> {% endif %}
>
> is this possible?

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



ManyToMany container with templating

2010-06-29 Thread Rishtastic
Hi all,

I'm trying to do

foo is a User auth object
comments.readers is a ManyToMany field that links back to the User

I can iterate just fine by using
{% for foo in comments.readers.all %}

{% endfor %}


But I want to do this:

{% if foo in comments.readers.all %}
do stuff here
{% endif %}


is this possible?

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