diff --git a/helios/migrations/0011_auto__add_field_election_election_info_url.py b/helios/migrations/0011_auto__add_field_election_election_info_url.py new file mode 100644 index 0000000000000000000000000000000000000000..48c98fb14b0e962f86ca66326dee9687c4c7bdf9 --- /dev/null +++ b/helios/migrations/0011_auto__add_field_election_election_info_url.py @@ -0,0 +1,147 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding field 'Election.election_info_url' + db.add_column('helios_election', 'election_info_url', + self.gf('django.db.models.fields.CharField')(max_length=300, null=True), + keep_default=False) + + + def backwards(self, orm): + # Deleting field 'Election.election_info_url' + db.delete_column('helios_election', 'election_info_url') + + + models = { + 'helios.auditedballot': { + 'Meta': {'object_name': 'AuditedBallot'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'election': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['helios.Election']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'raw_vote': ('django.db.models.fields.TextField', [], {}), + 'vote_hash': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'helios.castvote': { + 'Meta': {'object_name': 'CastVote'}, + 'cast_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'invalidated_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'quarantined_p': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'released_from_quarantine_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'verified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'vote': ('helios.datatypes.djangofield.LDObjectField', [], {}), + 'vote_hash': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'vote_tinyhash': ('django.db.models.fields.CharField', [], {'max_length': '50', 'unique': 'True', 'null': 'True'}), + 'voter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['helios.Voter']"}) + }, + 'helios.election': { + 'Meta': {'object_name': 'Election'}, + 'admin': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['helios_auth.User']"}), + 'archived_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'cast_url': ('django.db.models.fields.CharField', [], {'max_length': '500'}), + 'complaint_period_ends_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'datatype': ('django.db.models.fields.CharField', [], {'default': "'legacy/Election'", 'max_length': '250'}), + 'description': ('django.db.models.fields.TextField', [], {}), + 'election_info_url': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True'}), + 'election_type': ('django.db.models.fields.CharField', [], {'default': "'election'", 'max_length': '250'}), + 'eligibility': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'encrypted_tally': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'featured_p': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'frozen_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'help_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '250'}), + 'openreg': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'private_key': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'private_p': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'public_key': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'questions': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'randomize_answer_order': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'registration_starts_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'result': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'result_proof': ('helios_auth.jsonfield.JSONField', [], {'null': 'True'}), + 'short_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'tallies_combined_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'tallying_finished_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'tallying_started_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'tallying_starts_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'use_advanced_audit_features': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'use_voter_aliases': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'voters_hash': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), + 'voting_ended_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'voting_ends_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'voting_extended_until': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'voting_started_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}), + 'voting_starts_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}) + }, + 'helios.electionlog': { + 'Meta': {'object_name': 'ElectionLog'}, + 'at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'election': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['helios.Election']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'log': ('django.db.models.fields.CharField', [], {'max_length': '500'}) + }, + 'helios.trustee': { + 'Meta': {'unique_together': "(('election', 'email'),)", 'object_name': 'Trustee'}, + 'decryption_factors': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'decryption_proofs': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'election': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['helios.Election']"}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), + 'pok': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'public_key': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'public_key_hash': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'secret': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'secret_key': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'helios.voter': { + 'Meta': {'unique_together': "(('election', 'voter_login_id'),)", 'object_name': 'Voter'}, + 'alias': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), + 'cast_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'election': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['helios.Election']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['helios_auth.User']", 'null': 'True'}), + 'uuid': ('django.db.models.fields.CharField', [], {'max_length': '50'}), + 'vote': ('helios.datatypes.djangofield.LDObjectField', [], {'null': 'True'}), + 'vote_hash': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), + 'voter_email': ('django.db.models.fields.CharField', [], {'max_length': '250', 'null': 'True'}), + 'voter_login_id': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}), + 'voter_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True'}), + 'voter_password': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}) + }, + 'helios.voterfile': { + 'Meta': {'object_name': 'VoterFile'}, + 'election': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['helios.Election']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'num_voters': ('django.db.models.fields.IntegerField', [], {'null': 'True'}), + 'processing_finished_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'processing_started_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'voter_file': ('django.db.models.fields.files.FileField', [], {'max_length': '250', 'null': 'True'}), + 'voter_file_content': ('django.db.models.fields.TextField', [], {'null': 'True'}) + }, + 'helios_auth.user': { + 'Meta': {'unique_together': "(('user_type', 'user_id'),)", 'object_name': 'User'}, + 'admin_p': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'info': ('helios_auth.jsonfield.JSONField', [], {}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True'}), + 'token': ('helios_auth.jsonfield.JSONField', [], {'null': 'True'}), + 'user_id': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'user_type': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + } + } + + complete_apps = ['helios'] \ No newline at end of file diff --git a/helios/models.py b/helios/models.py index 67f0895f614d613bd2cf0311021028e24b7add0f..869f1fa00196007e537c0b68ecc5ddae43484f11 100644 --- a/helios/models.py +++ b/helios/models.py @@ -138,6 +138,9 @@ class Election(HeliosModel): # help email help_email = models.EmailField(null=True) + # downloadable election info + election_info_url = models.CharField(max_length=300, null=True) + # metadata for the election @property def metadata(self):