Re: Displaying a table and make its columns sortable

2011-02-18 Thread Arun K.Rajeevan
Thanks, very good community!

On Feb 18, 3:49 am, Shawn Milochik  wrote:
> On Thu, Feb 17, 2011 at 4:44 PM, Arun K.Rajeevan  wrote:
> > Show me the django way to do this.
>
> The "Django" way to do this is to learn basic programming skills. You
> originally asked a mess of random questions which didn't have anything
> to do with Django. We answered anyway. Now you're basically us to
> write your application logic for you.
>
> You'll get much more helpful responses when your requests indicate
> you've actually tried to do something and run into a problem.
>
> Shawn

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



Re: Displaying a table and make its columns sortable

2011-02-17 Thread Shawn Milochik
On Thu, Feb 17, 2011 at 4:44 PM, Arun K.Rajeevan  wrote:

> Show me the django way to do this.
>


The "Django" way to do this is to learn basic programming skills. You
originally asked a mess of random questions which didn't have anything
to do with Django. We answered anyway. Now you're basically us to
write your application logic for you.

You'll get much more helpful responses when your requests indicate
you've actually tried to do something and run into a problem.

Shawn

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



Re: Displaying a table and make its columns sortable

2011-02-17 Thread Arun K.Rajeevan
I think, I'm not clear in first place.
My confusion revolve around following
1) The table that I display is not constitute a single model from
django application.
It combine two models from django application and data returned from a
web-service.

Since web-service included in the recipe, it make me confuse.

For an example,

class TableOne(models.Model):
qID = models.IntegerField(unique = True)
x= CharField(max_length = 20)
# and so on...

class TableTwo(models.Model):
zID = models.IntegerField(unique = True)
x= CharField(max_length = 20)
# and so on...

Now, what I want is display a table which combines TableOne and
TableTwo and shows, ID (for which show qID and zID), x, and foo and
bar
And this foo and bar comes from two web-service calls one specific to
get an object with zID and another for qID.
with a single call with zID I get both foo and bar.

(I used web2py before, there, I get an SQLTABLE which is a
representation of model in table form, where for tasks like this I
apply a virtual field to retrieve foo and bar automatically. And use
powerTable for pagination of models. May be I'm looking for something
like this, that's why I'm confused.)

Show me the django way to do this.

On Feb 18, 2:31 am, Tim Sawyer  wrote:
> On 17/02/11 20:18, Arun K.Rajeevan wrote:
>
>
>
> > I've a table which stores unique ids for an object that I've to retrieve
> > via SOAP( I've a url to a WSDL file) service calls.
> > This table also contains some details like last access to this object
> > from application etc.
>
> > *What I need very badly and urgently:*
> > I've to display a few items from this table + data retrieved from the
> > SOAP service per unique ids in the table into a  
> > And columns must be sortable and there's a drop down list for filtering
> > too. probably I need pagination too.
> > Since, all the data is not in my applications table and comes from SOAP
> > service, I'm confused about it.
>
> > How should I go about it?
>
> > I can think of something like, there'll be custom methods in the table,
> > which retrieves each item that need to be displayed from SOAP service.
> > (Con: This will need so many SOAP service calls per item, where as I can
> > retrieve whole data in one go, here I need to get data and use only one
> > field from it. ), and from what I know, if I use custom methods, then
> > table columns will not be sortable.
>
> > I'm not a django expert. so please consider this while answering.
>
> As has been said, you're probably better of doing this with
> JavaScript/jQuery.
>
> I'd suggest looking at some jQuery plugins, such as:
>
> http://tablesorter.com/docs/http://plugins.jquery.com/project/PicNetTableFilter
>
> Tim.

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



Re: Displaying a table and make its columns sortable

2011-02-17 Thread Tim Sawyer

On 17/02/11 20:18, Arun K.Rajeevan wrote:

I've a table which stores unique ids for an object that I've to retrieve
via SOAP( I've a url to a WSDL file) service calls.
This table also contains some details like last access to this object
from application etc.

*What I need very badly and urgently:*
I've to display a few items from this table + data retrieved from the
SOAP service per unique ids in the table into a  
And columns must be sortable and there's a drop down list for filtering
too. probably I need pagination too.
Since, all the data is not in my applications table and comes from SOAP
service, I'm confused about it.

How should I go about it?

I can think of something like, there'll be custom methods in the table,
which retrieves each item that need to be displayed from SOAP service.
(Con: This will need so many SOAP service calls per item, where as I can
retrieve whole data in one go, here I need to get data and use only one
field from it. ), and from what I know, if I use custom methods, then
table columns will not be sortable.

I'm not a django expert. so please consider this while answering.


As has been said, you're probably better of doing this with 
JavaScript/jQuery.


I'd suggest looking at some jQuery plugins, such as:

http://tablesorter.com/docs/
http://plugins.jquery.com/project/PicNetTableFilter

Tim.

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



Re: Displaying a table and make its columns sortable

2011-02-17 Thread Shawn Milochik
This sounds like a good time to use jQuery. If all the data is being
displayed at once anyway, then it'll be faster and easier to do the
filtering and sorting client-side.

Even if you're talking about a lot of data, things like the
click-sorting of table columns should probably be done with
JavaScript, not be reloading the entire page.

The pagination you'll have to handle with CSS. That may be annoying to
do, depending on whether you can reliably assume that x number of
records constitute a page.

However, none of this has much of to do with Django. It's just general
Web development stuff.

Shawn

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



Displaying a table and make its columns sortable

2011-02-17 Thread Arun K.Rajeevan
I've a table which stores unique ids for an object that I've to retrieve via 
SOAP( I've a url to a WSDL file) service calls.
This table also contains some details like last access to this object from 
application etc.

*What I need very badly and urgently:*
I've to display a few items from this table + data retrieved from the SOAP 
service per unique ids in the table into a  
And columns must be sortable and there's a drop down list for filtering too. 
probably I need pagination too.
Since, all the data is not in my applications table and comes from SOAP 
service, I'm confused about it.

How should I go about it?

I can think of something like, there'll be custom methods in the table, 
which retrieves each item that need to be displayed from SOAP service. (Con: 
This will need so many SOAP service calls per item, where as I can retrieve 
whole data in one go, here I need to get data and use only one field from 
it. ), and from what I know, if I use custom methods, then table columns 
will not be sortable.

I'm not a django expert. so please consider this while answering. 

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