Hi everybody,
I have a weird problem with a custom template tag I made. The template
tag is built on top of django-voting app and provides upvote and
downvote counts, while standard django-voting tags only provides total
number of votes and score.
Here is the snippet I wrote: http
I am not aware what 'relations' can do or if there was anything like
'relations' let alone 'GenericRelations' :)
What does the Sum('vote') done?
--
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
On May 6, 2011, at 8:35 AM, Shawn Milochik wrote:
> Sorry, I was going off of your pasted code.
>
> Sounds like this could be a case for annotate.
> http://docs.djangoproject.com/en/1.3/ref/models/querysets/#annotate
>
> I recommend reading this whole page, along with the two prerequisite pages
Sorry, I was going off of your pasted code.
Sounds like this could be a case for annotate.
http://docs.djangoproject.com/en/1.3/ref/models/querysets/#annotate
I recommend reading this whole page, along with the two prerequisite
pages called for at the top. It'll help a lot.
--
You received th
Appreciate your response, Shawn. I am a newbie and struggling.
Yea, but that is 'latest'. I need ascending descending order by
score/votes. Can't seem to figure that one out. That would go in the else
part. By default in my app, I want the comments to be sorted by vote/score.
else:#This is
You could probably sort ascending, take a subset, then reverse the search.
Something like this:
| .order_by('created_datetime', 'modified_datetime')[:100].reverse()|
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, s
I see this project is an old project http://code.google.com/p/django-voting/
Not sure if it is actively maintained anymore. is this the one I
should look into using or is there a newer one that super seeded this
app.
--
You received this message because you are subscribed to the Google Groups
ne
> > supplied by django-voting. That correct?
>
> I'm not familiar with django-voting, but yes that sounds right.
> --
> DR.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this gr
On Nov 1, 3:08 pm, Sithembewena Lloyd Dube wrote:
> Thanks Daniel, makes sense. Also, I was making the mistake of thinking that
> I had to create a separate view, forgetting that I am calling the one
> supplied by django-voting. That correct?
I'm not familiar with django-voting
Thanks Daniel, makes sense. Also, I was making the mistake of thinking that
I had to create a separate view, forgetting that I am calling the one
supplied by django-voting. That correct?
On Mon, Nov 1, 2010 at 3:45 PM, Daniel Roseman wrote:
> On Nov 1, 1:23 pm, Sithembewena Lloyd Dube wr
On Nov 1, 1:23 pm, Sithembewena Lloyd Dube wrote:
> Hi all,
>
> I have django-voting installed and am trying to get through the 'recipe'. I
> have a url pattern which (I expect) should route voting actions to a view.
>
> Problem is, which view or views should handle
Hi all,
I have django-voting installed and am trying to get through the 'recipe'. I
have a url pattern which (I expect) should route voting actions to a view.
Problem is, which view or views should handle this? The URL pattern is as
follows:
(r'^videos/(?P\d+)/(?P*up|d
cebook friends) for a user - these users are
> objects of the Django User model:
> [friend1,friend2, friend3..]
>
> I use the django voting app where users can vote on an item.
>
> the resulting page has 10 items and for each item, it will list all
> the friends who have voted
I'm trying to find the most efficient way to accomplish the below:
I have a list of users (facebook friends) for a user - these users are
objects of the Django User model:
[friend1,friend2, friend3..]
I use the django voting app where users can vote on an item.
the resulting page has 10
On Fri, Mar 13, 2009 at 6:03 PM, Shantp wrote:
>
> I'm getting this error:
>
> AttributeError: 'NoneType' object has no attribute 'append'
>
> It's coming from this line in my template:
>
> {% scores_for_objects share_list as score_dict %}
>
> If I remove this line everything is fine. I wasn't ge
I'm getting this error:
AttributeError: 'NoneType' object has no attribute 'append'
It's coming from this line in my template:
{% scores_for_objects share_list as score_dict %}
If I remove this line everything is fine. I wasn't getting this error
before but I had to wipe my server and create a
I'm using a modified version of the django-voting app to handle the
rating of objects on a site I'm working on. I'd like to figure out a
way to display the rank of an object in relation to all other objects
in the same model. It would seem that I would have to calculate the
av
*Sorry for confusing,my English is bad also.
The problem is django-voting is not provide templatetags to access vote for
particular object. Instead it provide templatetags to access only template
context variable (Correct me if I'm wrong). See bebow,
score_for_object
Retr
tem). For example,
>
> Item.objects.follow_model(Post)
>
> After that, I added django-voting (http://django-
> voting.googlecode.com/) to my application list.
>
> The problem is, at the index page. I want to list latest item. If
> latest item is Post and it has Vote as well, I will show post
Hi all,
I use a modified version of http://jellyroll.googlecode.com/ by adding
my own models into follow list (jellyrool.models.Item). For example,
Item.objects.follow_model(Post)
After that, I added django-voting (http://django-
voting.googlecode.com/) to my application list.
The problem is
I'm using django-voting on a model shared across two sites. I get the
top-rated objects with get_top:
best = Vote.objects.get_top(Foo, limit=50, reversed=False)
But it's bringing up the top-rated from both sites I need to just
get the ones for the current site.
I see. Thanks for the response. I appreciate it.
--~--~-~--~~~---~--~~
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 gro
On Nov 17, 2007 3:42 AM, tanukichan <[EMAIL PROTECTED]> wrote:
>
> When looking at the example given in the overview.txt file for django-
> voting (http://django-voting.googlecode.com/svn/trunk/docs/
> overview.txt), they give the following:
>
> "Votes are rec
When looking at the example given in the overview.txt file for django-
voting (http://django-voting.googlecode.com/svn/trunk/docs/
overview.txt), they give the following:
"Votes are recorded using the ``record_vote`` helper function::
>>> from django.contrib.auth.mode
Thanks Samuel. I tried that, too, but all p.X seemed to return was the
index of the tuple (1, 2, etc).
On Sep 12, 2:54 pm, Samuel Adam <[EMAIL PROTECTED]> wrote:
> Try this :
>
> {% for p in posts %}
> {{ p.0 }}
> {{ p.1 }}
> {% endfor %}
>
> :P
--~--~-~--~~-
Try this :
{% for p in posts %}
{{ p.0 }}
{{ p.1 }}
{% endfor %}
:P
--~--~-~--~~~---~--~~
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@googlegro
> How about something like this:
>
> {% for p in posts %}
> {{ p.headline }}
> {{ p.body }}
> {% endfor %}
That's what I thought SHOULD work, but it's not. I think I may just
take a different route with it.
--~--~-~--~~~---~--~~
You received this
>
> Problem is, I can't manage to do anything with posts in my template.
What exactly are you trying to do that's not working?
> When I view source, I see an object reference, so I know it's getting
> there, and I know this is probably a terribly dumb question, but how
> do I access posts?
How
I'm trying to use django-voting's get_top function:
``get_top(Model, limit=10, reversed=False)`` -- Gets the top
``limit`` scored objects for a given model.
If ``reversed`` is ``True``, the bottom ``limit`` scored objects
are retrieved instead.
Yields ``(object, score)``
If you use trunk. problem was fixed.
- benoît
On 8/30/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>
> On 8/30/07, Kelsey Ruger <[EMAIL PROTECTED]> wrote:
> >
> > I just checked out the latest versions of django-voting and django-
> > tagging. When attemptin
On 8/30/07, Kelsey Ruger <[EMAIL PROTECTED]> wrote:
>
> I just checked out the latest versions of django-voting and django-
> tagging. When attempting a syncdb I get the following error - tagging:
> 'DatabaseWrapper' object has no attribute 'ops' or vot
I just checked out the latest versions of django-voting and django-
tagging. When attempting a syncdb I get the following error - tagging:
'DatabaseWrapper' object has no attribute 'ops' or voting:
'DatabaseWrapper' object has no attribute 'ops
32 matches
Mail list logo