Quantcast
Channel: My site - RSS feed
Browsing all 12 articles
Browse latest View live

Comment by kporangehat for Maybe you could create a special user account and...

Couple of issues: 1) When I run `post.points = n`, `post.save()`, the question list doesn't show the votes. However if I click into the Question, the votes are displayed and then the next time I go to...

View Article



Comment by Evgeny for Maybe you could create a special user account and make...

It's because of the cache. Just delete all cache after the import: python manage.py shell from django.core.cache import cache cache.clear() There is cache for the question summary snippet for the front...

View Article

Comment by kporangehat for Maybe you could create a special user account and...

Thanks for the clarification. However, clearing the cache doesn't seem to have any effect on the previous behavior. Here's the complete example of what I'm doing to try and seed a vote count of 10 on a...

View Article

Comment by Evgeny for Maybe you could create a special user account and make...

Points is 10*(vote_up_count - vote_down_count), sorry I should have explained before.

View Article

Comment by kporangehat for Maybe you could create a special user account and...

Brilliant. I think that will work. I'll give it a shot. Thanks!

View Article


Comment by kporangehat for Maybe you could create a special user account and...

No worries. As for the `Vote.VOTE_UP` and `Vote.VOTE_DOWN`, this won't work for seeding a Vote count of more than one when we do the import since we're still limited by a unique constraint on...

View Article

Comment by Evgeny for Maybe you could create a special user account and make...

Yes, you're right! I'll see what else I can suggest.

View Article

Comment by Evgeny for Maybe you could create a special user account and make...

Oh, sorry missed that. Btw the `vote` value of `Vote` should be either `Vote.VOTE_UP` or `Vote.VOTE_DOWN` (which are +1 and -1). You will need the `Vote` records if you ever decide to recalculate the...

View Article


Comment by kporangehat for Maybe you could create a special user account and...

Can't a user only vote up a question once?

View Article


Comment by kporangehat for Maybe you could create a special user account and...

Okay so it looks like I also need to set the `Thread.points` value as well to get this to work completely. Also, I don't see the points value computed the way you describe above. If I up-vote a post,...

View Article

Answer by Evgeny for In the process of rewriting the importer for Zendesk,...

Maybe you could create a special user account and make it vote? There may be a limitation on the number of votes per day - if you hit that we might need to do something about this. If you don't like to...

View Article

seeding vote count for questions

In the process of rewriting the importer for Zendesk, I'm wondering if there's a generic way to seed the vote count for a particular question. I found the `increase_view_count()` method for increasing...

View Article
Browsing all 12 articles
Browse latest View live


Latest Images