Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

First try and removing the brokenness from autogenerated models

    - Django chokes on a field named id when there is nothing
      with primary_key=True in the models
  • Loading branch information...
commit a51f1d2156a59edbf9320f43d56701aa381e2e28 1 parent 3f83d89
Jeff Schroeder authored

Showing 1 changed file with 0 additions and 6 deletions. Show diff stats Hide diff stats

  1. +0 6 mango/members/models.py
6 mango/members/models.py
... ... @@ -1,14 +1,12 @@
1 1 from django.db import models
2 2
3 3 class ElectionAnonTokens(models.Model):
4   - id = models.IntegerField(primary_key=True)
5 4 anon_token = models.CharField(max_length=600)
6 5 election_id = models.IntegerField()
7 6 class Meta:
8 7 db_table = u'election_anon_tokens'
9 8
10 9 class ElectionChoices(models.Model):
11   - id = models.IntegerField(primary_key=True)
12 10 election_id = models.IntegerField()
13 11 choice = models.CharField(max_length=450)
14 12 class Meta:
@@ -28,7 +26,6 @@ class Meta:
28 26 db_table = u'election_tmp_tokens'
29 27
30 28 class ElectionVotes(models.Model):
31   - id = models.IntegerField(primary_key=True)
32 29 choice_id = models.IntegerField()
33 30 anon_id = models.IntegerField()
34 31 preference = models.IntegerField()
@@ -36,7 +33,6 @@ class Meta:
36 33 db_table = u'election_votes'
37 34
38 35 class Elections(models.Model):
39   - id = models.IntegerField(primary_key=True)
40 36 type = models.CharField(max_length=30)
41 37 name = models.CharField(max_length=450)
42 38 voting_start = models.DateTimeField(null=True, blank=True)
@@ -47,7 +43,6 @@ class Meta:
47 43 db_table = u'elections'
48 44
49 45 class Electorate(models.Model):
50   - id = models.IntegerField()
51 46 firstname = models.CharField(max_length=150, blank=True)
52 47 lastname = models.CharField(max_length=150, blank=True)
53 48 email = models.CharField(max_length=300, blank=True)
@@ -55,7 +50,6 @@ class Meta:
55 50 db_table = u'electorate'
56 51
57 52 class FoundationMember(models.Model):
58   - #id = models.IntegerField(primary_key=True)
59 53 firstname = models.CharField(max_length=150, blank=True)
60 54 lastname = models.CharField(max_length=150, blank=True)
61 55 email = models.CharField(max_length=300, blank=True)

0 comments on commit a51f1d2

Please sign in to comment.
Something went wrong with that request. Please try again.