With the PyLucid poll plugin you can make some simple polls. Here a example poll:

Features

  • A poll can have unlimited choices
  • You can make a few polls
    • Put one or more specific poll(s) somewhere into cms page
    • Put all existing polls into one page
  • You can deactivate polls (no more votes allowed)
  • You can limit how can make votes and who can see the poll by: user type (anonymous, staff- or super-users) or user group
  • You can limit how many votes from one IP address are allowed
  • You can put a poll on different sites at the same time

TODO

  • Fix cache problem for anonymous users
  • Add localization support
  • Use PyLucid IP-Ban function
  • Add a link to results, so the user must not vote to see it
  • nice to have:
    • Add a edit link for staff users
    • Use AJAX view for vote

limits anonymous votes

There is no way to really limit the votes from anonymous users!

We set a COOKIE on the client to mark him as "has vote", but the user can delete the cookie and vote again ;)

But you can limit the votes from the same IP address. On the other site you can block people sitting behind a proxy ;)

If the poll is not allowed to anonymous user, every user can really vote one time!

code examples

Display the newest, active and voteable poll:

1
{% lucidTag poll %}

Note: It's not a good idea to put this into global page template, see: https://github.com/jedie/PyLucid/issues/53

Put a specific poll into cms page (Where x is the id of the poll):

1
{% lucidTag poll id=x %}

Put all existing polls into a page:

1
{% lucidTag poll.all_polls %}

You can filter the polls with hide_deactivated and/or not_voteable, e.g.:

1
{% lucidTag poll.all_polls hide_deactivated=True not_voteable=True %}