Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7925085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:07:17+00:00 2026-06-03T18:07:17+00:00

I have gone through Django’s basic Poll tutorial, and I realize that I can

  • 0

I have gone through Django’s basic Poll tutorial, and I realize that I can change some things here and there and make a HotOrNot/FaceMash style site out of it. However, since I’m still a noob, I can only come up with the concept of it – there’s no way for me to know how to do it. So the concept is that instead of displaying all the choices for the poll, display only two random choices(which should not be the same). Also, there needs to be a way to bulk upload from computer or fetch from an external storage/server all the images as choices to the poll. Could anyone tell me how to make this happen? Thank you very much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T18:07:20+00:00Added an answer on June 3, 2026 at 6:07 pm

    Well, this is not clear but let’s give a try.
    I guess you want to compare 2 random photos, and let the user choose which is the best.
    I think of one simple way to do this, not necessarily with the poll app.

    First, create a model to store images. For example:

    class Image(models.Model):
      picture = models.ImageField("Face picture", max_length=255, upload_path=<your upload path function>)
    

    Then instead of using poll, make your own:

    class Match(models.Model):
      winner = models.ForeignKey('yourapp.Image')
      loser = models.ForeignKey('yourapp.Image')
    

    Make your forms and save the results of the poll in a Match instance.
    To know how many times a picture has been shown, just look for Match rows where winner or loser is the picture:

    times_shown = Match.objects.filter(Q(winner=pic)|Q(loser=pic)).count()
    

    Then the same applies to know how much a picture is popular. If it is often a winner, then you can assume it has good looks. Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am an absolute novice to django-cms. I have gone through the tutorial and
I have gone through many related SO threads and got some basic info. Already
I have been learning MVVM / WPF and have gone through the tutorial here
I have gone through some other answers, but cannot get the solution to my
I've have gone through stackoverflow for days and googled a lot but can still
I have gone through with some of the sample examples of blackberry. And in
I have gone through Head First Java and some other sites but I couldn't
I have gone through the N2 CMS documentation at length and can see no
I have gone through several tutorials on fragments and I can't get my queries
I have gone through the tutorial for component development at http://docs.joomla.org/Developing_a_Model-View-Controller_(MVC)_Component_for_Joomla!1.7_-_Part_06 . While the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.