Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
8333df85
Commit
8333df85
authored
11 years ago
by
Ben Adida
Browse files
Options
Downloads
Patches
Plain Diff
added field to election for a downloadable file of extra info, eg. candidate bios
parent
1de4e27a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
helios/migrations/0011_auto__add_field_election_election_info_url.py
+147
-0
147 additions, 0 deletions
...ations/0011_auto__add_field_election_election_info_url.py
helios/models.py
+3
-0
3 additions, 0 deletions
helios/models.py
with
150 additions
and
0 deletions
helios/migrations/0011_auto__add_field_election_election_info_url.py
0 → 100644
+
147
−
0
View file @
8333df85
# -*- 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
This diff is collapsed.
Click to expand it.
helios/models.py
+
3
−
0
View file @
8333df85
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment