GithubHelp home page GithubHelp logo

agoravoting / agora-ciudadana Goto Github PK

View Code? Open in Web Editor NEW
124.0 124.0 48.0 17.33 MB

Liquid Voting system made with python and django

Home Page: https://www.agoravoting.com

License: GNU Affero General Public License v3.0

Makefile 0.30% Python 44.48% CSS 7.42% JavaScript 47.80% Shell 0.01%

agora-ciudadana's People

Contributors

ablanco avatar danigm avatar edulix avatar findeton avatar hirunatan avatar javaguirre avatar lcabrera avatar ruescasd avatar voodoorai2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agora-ciudadana's Issues

DNIe backend

DNIe is the Spanish eID. As explained in
https://groups.google.com/forum/#!topic/agora-ciudadana-devel/pr-ZATe6QIQ
it would be easy to integrate the DNIe into Ágora Ciudadana.

Those with a running instance of Ágora may be able to prepare a pull request. The FNMT backend is agora_site/agora_core/backends/fnmt.py
The DNIe backend should work in the same way.

The server should include the "AC RAIZ DNIE - DIRECCION GENERAL DE LA POLICIA" authority, like the "FNMT Clase 2 CA - FNMT" in the FNMT case.

UserView - shows information about an user

This view shows the information about any given user. Shows elections the user has participated in, delegates, and received delegations.

Shows a feed with recent events (for example, elections that the user has participated in, or activity related to delegates or people delegating their vote to the user)

The latest design of this view is in media/userview.svg and you can also see it uploaded as png image in here: http://i.imgur.com/LYJub.png . Of course the design is meant to be an example and not an exact or pixel perfect image of how it should look. Please, use twitter bootstrap base css/html elements in the template.

UserSettingsView - configuration of the user

This view will allow the user to modify all its personal settings/configuration:

  • Personal details (user name and surname, email, small description text, biography text..)
  • notification settings (receive updates by email?)
  • remove user form (legally we need to allow the user unregister)
  • change password

There's no design yet for this view but the idea is to make it heavily inspired on github user settings view.

Manage translations via Transifex

Idly working on setting this up, and figured I should have a place to keep things organized.

Created an agoravoting organization:
https://www.transifex.com/organization/agoravoting

Had issue with uploading po/pot files and it not using English as the base language, so sent an email. Got this reply:

Hey Patrick,

I've just checked your files and noticed that you use django. Django has a management command, called makemessages that could use to extract a .pot or .po file.

You should either upload a po template (.pot files) or a .po file for the source (English) language. Please check differences between using .po and .pot files, as source files.

I hope this helped, but please let me know if there's anything else I could assist you with.

Have a great day!

Best,

Elena

I'll investigate further later. Django is new to me :)

ContactForm

A simple contact form that should send an email to the admins of the web site.

HomeViewAuthenticated - Home page for an authenticated user

Main page shown to the user when it is authenticated. Shows a general feed like a of the latests updates in ágora and some relevant info in the lateral bar.

The latest design of this view for the case in which is in media/home_loggedin.svg and you can also see it uploaded as png image in here: http://i.imgur.com/5Ni2C.png . Of course the design is meant to be an example and not an exact or pixel perfect image of how it should look. Please, use twitter bootstrap base css/html elements in the template.

Rendering error when displaying an agora

Hello, I have a fresh development installation with SQL Lite and the last repository version (last commit "Allow anonymous authorization for login and register").

After creating an agora via web UI, the agora page generates the following error:

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/xavi/test-agora-1

Django Version: 1.5.5
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.staticfiles',
 'django.contrib.messages',
 'django.contrib.admin',
 'django.contrib.comments',
 'django.contrib.markup',
 'django.contrib.flatpages',
 'debug_toolbar',
 'south',
 'tastypie',
 'easy_thumbnails',
 'userena',
 'rosetta',
 'actstream',
 'social_auth',
 'crispy_forms',
 'agora_site.agora_core',
 'agora_site.accounts',
 'haystack',
 'captcha',
 'djcelery',
 'guardian',
 'djsgettext',
 'djangosecure')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'djangosecure.middleware.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.transaction.TransactionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'debug_toolbar.middleware.DebugToolbarMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'social_auth.middleware.SocialAuthExceptionMiddleware')


Template error:
In template /home/xavi/Desenvolupament/Codi/agora-ciudadana/agora_site/agora_core/templates/agora_core/agora_view.html, error at line 93
   'str' object has no attribute 'get'
   83 : {% include "agora_core/client/mail_to_members.html" %}


   84 : {% include "agora_core/client/tallied_elections_view.html" %}


   85 : {% include "agora_core/client/add_members_modal_dialog.html" %}


   86 : {% include "agora_core/client/send_mail.html" %}


   87 : {% include "agora_core/client/agora_tabs.html" %}


   88 : {% include "agora_core/client/agora_calendar.html" %}


   89 : <script>


   90 : var ajax_data = {


   91 :     'tallied_elections': {% rest request '/agora/' agora.id '/tallied_elections/?limit=3' %},


   92 :     'agora': {% rest request '/agora/' agora.id '/' %},


   93 :     'user_permissions':  {% custom_rest request "POST" '{"action":"get_permissions"}' '/agora/' agora.id '/action/' %} 


   94 : };


   95 : 


   96 : var current_tab = "{% block agora-tab-name %}activity{% endblock %}";


   97 : 


   98 : app.currentView = new Agora.AgoraView();


   99 : 


   100 : </script>


   101 : {% endblock %}


   102 : {% block footer %} {% endblock %}


   103 : 

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  140.                     response = response.render()
File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in render
  105.             self.content = self.rendered_content
File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in rendered_content
  82.         content = template.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  140.             return self._render(context)
File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  66.     return self.nodelist.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  830.                 bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  124.         return compiled_parent._render(context)
File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  66.     return self.nodelist.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  830.                 bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  124.         return compiled_parent._render(context)
File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py" in instrumented_test_render
  66.     return self.nodelist.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  830.                 bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  63.             result = block.nodelist.render(context)
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  830.                 bit = self.render_node(node, context)
File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/xavi/Desenvolupament/Codi/agora-ciudadana/agora_site/agora_core/templatetags/agora_utils.py" in render
  253.                 query=query_dict, data=data, method=method)
File "/home/xavi/Desenvolupament/Codi/agora-ciudadana/agora_site/misc/utils.py" in rest
  405.         res = view.func(hreq, *view.args, **view.kwargs)
File "/home/xavi/Desenvolupament/Codi/agora-ciudadana/agora_site/misc/generic_resource.py" in wrap
  203.                 self.is_authenticated(request)
File "/usr/local/lib/python2.7/dist-packages/tastypie/resources.py" in is_authenticated
  549.         auth_result = self._meta.authentication.is_authenticated(request)
File "/usr/local/lib/python2.7/dist-packages/tastypie/authentication.py" in is_authenticated
  489.             check = backend.is_authenticated(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tastypie/authentication.py" in is_authenticated
  184.             username, api_key = self.extract_credentials(request)
File "/usr/local/lib/python2.7/dist-packages/tastypie/authentication.py" in extract_credentials
  169.             username = request.GET.get('username') or request.POST.get('username')

Exception Type: AttributeError at /xavi/test-agora-1
Exception Value: 'str' object has no attribute 'get'

Could someone have a look ? Thanks!

CreateAgoraForm

This will be a simple form to let any authenticated user create their own new personal agora, just like in github anyone can create easily a new repo.

Create/Edit VotingForm

This will be a form that will allow the user to create a new voting inside any Agora. The form should allow the user to set the title, small description, an introduction to the voted text, thetext being voted, the start and end date, and the different options being voted.

Any user should be able to create a voting. Only admins of the agora to which the voting was requested will be able to change the state of the voting to accepted. Then the voting will be able to change to status "confirmed", and then the settings of the voting won't be allowed to change.

No me funciona el proyecto

Hola amigos,

Disculpadme si estoy haciendo algo inapropiado, ya que soy novato. Me ha parecido este lugar más apropiado que la lista de correo, ya que es una cuestión técnica. En inglés, aun me entenderíais peor.

El caso es que me he bajado el proyecto y no funciona, Tanto desde pycharm como desde la línea de comandos, ejecuto "python manage.py test agora_core.AgoraTest.test_agora --settings=agora_site.test_settings" y obtengo estos errores:

Traceback (most recent call last):
File "manage.py", line 9, in
execute_from_command_line(sys.argv)
File "C:\Python34\lib\site-packages\django\core\management__init__.py", line
399, in execute_from_command_line
utility.execute()

etc...

He importado todos los "requirements" con pycharm, y nada, sigue el error.

Disculpad si el error que estoy cometiendo es demasiado evidente.

Gracias por vuestra ayuda, paciencia y comprensión.

Develop from a common vagrant development environment

As I mentioned in some other issues, working on getting this working:
https://github.com/patcon/agora-ciudadana-vagrant

Let me know if you think it's the correct approach.

I might recommend locking some things down a bit more than they are right now, as that will reduce the chances of folks working on slightly different sites. For example, while it seems that pip doesn't support lockfiles by default (like bundler and composer do), we could run pip freeze > requirements.lock and have the vagrant environment build from that file rather than using pip install -r requirements.txt --upgrade. That way, requirements.txt can still have the loose, human-readable deps, as specific as we care to specify for functionality (which tends to have more clarity for human developers to mess with :)

Anyhow, lemme know your thoughts, for sure!

whoosh requirement needs a version

During install I've got this

File "/home/ubuntu/agora-ciudadana/haystack/backends/whoosh_backend.py", line 44, in
from whoosh.spelling import SpellChecker
ImportError: cannot import name SpellChecker

requirements.txt says

whoosh

this install whoosh 2.5.1 that does't have SpellChecker

LoginRegisterView - used to login and register

This view allows the user to either login user his credentials or register in the web page. It also allows to sign in using their account in other website, at first probably only via twitter.

The latest design of this view is in media/home_login.svg and you can also see it uploaded as png image in here: http://i.imgur.com/LdlRK.png . Of course the design is meant to be an example and not an exact or pixel perfect image of how it should look. Please, use twitter bootstrap base css/html elements in the template.

CSS Design (using twitter bootstrap)

The django templates of the different views will be created using twitter bootstrap elements. At the same time, someone can work on adapting the twitter bootstrap css to match the design to the desired one. This will allow easier future redesigns of the app too.

AgoraSettingsView - Settings of an agora

This view will let the administrator of a given agora to configure its details. Among other things:

  • Agora details: name, description, list who are the administrators and make it possible to delete and remove admins.
  • Administer the list of members and the type of membership allowed (for example anyone can join, or maybe by filtered request)
  • Be able to remove the agora (which probably would only "close it" but make it available as read-only historical data)

As with UserSettingsView, it's meant to be heavily inspired on github user settings view.

Allow to show temporary results on a election.

Hi

When loading an election. Ex:

https://agoravoting.com/pdi/agora-testing/election/apoyo-al-autoempleo/votes

You can't see the global result of the election at the current moment.

It would be nice if each of the options for the election are shown in the page of the election with the percentage % of votes that each option has at the current moment. Also an horizontal bar chart or a pie chart with the options and the percentages will be very nice.

I understand that for the parliament perhaps is desired to hide the result until the election has finished. But this tool (agora) has potential for another uses where showing the current result before the election has ended is desired.

For example, many organizations have the need to have a tool like agora that allows them to quickly and effectively cast votes between their members where private vote is not an option. In such example, showing the current result is desired.

So I think that when creating a new election, an option should be added that when checked makes the current vote count of the election to be show at any moment when the election page is loaded.

Thanks!

Legal texts - create privacy policy and terms of service

This kind of website needs a clear and legally valid privacy policy and terms of service. For example, one have to deal with the right of the user to unregister and remove all his data from the web, but also the right of the rest of the users to do a scrutiny of the past votings which clearly have historical value. These two must be reconciled.

Set github repo to use active branch as default

This seems to be the active dev branch:
https://github.com/agoraciudadana/agora-ciudadana/tree/v2.1.x

When people arrive, github shows them master, which hasn't been touched in 5 month, so the project looks dead.

Can we fix this?

Also, why were the branches necessary in the first place? I understand if we want to try to "keep things in order", but the branching strategy seems to be fairly unorthodox :) My understanding is that projects tend to merge new release branches into master once it has proved itself as the way forward, and tags are used to deliniate versions. (My experience is in ruby-land, fwiw.)

SpellChecker was removed from Whoosh

I am getting this error during the installation process (in an updated Debian Wheezy from scratch). Tested from master branch and v2.1.0 tag.

File "/home/caligari/agora/haystack/backends/whoosh_backend.py", line 44, in <module>
    from whoosh.spelling import SpellChecker
ImportError: cannot import name SpellChecker

It seems a problem of versioning between Whoosh and Haystack: https://github.com/toastdriven/django-haystack/issues/819

HomeViewAnonymous - public homepage

Main page shown to the user when it is not authenticated. Shows a general feed like a of the latests updates in ágora. This feed should at first simulate it's being updated live by making appear every some seconds a new update, and popping the update in the worldwide map.

The latest design of this view for the case in which is in media/homeview.svg and you can also see it uploaded as png image in here: http://i.imgur.com/OgcFP.png . Of course the design is meant to be an example and not an exact or pixel perfect image of how it should look. Please, use twitter bootstrap base css/html elements in the template.

TwitterVoteView - target of a link shared on twitter about a user's vote

This is the view that will be shown to the user when it clicks on a link from twitter where an agora user delegate is publishing its vote. The idea of this view is to make agora viral, to encourage users to delegate in the people they follow on twitter.

The Vote or delegate buttons are shown here in the design shown below with a "sign in with twitter" mark. This will happen when an user accesses to this view without being logged in into the system (otherwise, those marks would not appear inside the buttons). This means that when the user click on the Vote or delegate buttons, they will be redirected to "login through twitter" twitter.com page, and afterwards redirected back to our web page and automatically the vote or delegate action will be automatically executed on their newly created user.

The page on the background will actually be the ElectionView. When the user either delegates or vote directly, they will be redirected to the ElectionView and a notification saying something along the lines to "Voting successful, share on twitter with your friends?" will also appear. The link to "View other delegates..." would show the DelegatesView for the given Agora.

The latest design of this view is in media/voting_twitterdelegateview.svg and you can also see it uploaded as png image in here: http://i.imgur.com/UPqD8.png . Of course the design is meant to be an example and not an exact or pixel perfect image of how it should look. Please, use twitter bootstrap base css/html elements in the template.

ElectionView - shows information about an election

Shows the information about an election.

The latest design of this view is in media/votingview.svg and you can also see it uploaded as png image in here: http://i.imgur.com/h2lAG.png . Of course the design is meant to be an example and not an exact or pixel perfect image of how it should look. Please, use twitter bootstrap base css/html elements in the template.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.