Commits

Pradeep Gowda  committed 56eb8d9

more pep8-ing. i am bored. can you tell

  • Participants
  • Parent commits f92ea25

Comments (0)

Files changed (4)

File application/urls.py

 from django.conf.urls.defaults import patterns, include, url
+from django.contrib import admin
 
-from django.contrib import admin
+
 admin.autodiscover()
 
 urlpatterns = patterns('',
     url(r'^$', 'votersystem.views.home', name='home'),
     url(r'^vs/$', 'votersystem.views.vs', name='vs'),
     url(r'^contact/$', 'votersystem.views.contact', name='contact'),
-
     url(r'^admin/', include(admin.site.urls)),
     url(r'^vs/form6/$', 'votersystem.views.form6index', name='form6index'),
     url(r'^vs/form6/new/$', 'votersystem.views.form6new', name='form6new'),
     url(r'^vs/form6/edit/(\d+)/$', 'votersystem.views.form6edit', name='form6edit'),
     url(r'^vs/form6/detail/(\d+)/$', 'votersystem.views.form6detail', name='form6detail'),
-    #XXX:PG: there has to be a better way to organise the views. refactor to a 'views' package?
-    #THEJ@PG : please go ahead and create. I will follow your std
     url(r'^vs/form7/$', 'votersystem.views.form7index', name='form7index'),
     url(r'^vs/form7/new/$', 'votersystem.views.form7new', name='form7new'),
     url(r'^vs/form8/$', 'votersystem.views.form8index', name='form8index'),
     url(r'^vs/form8/new/$', 'votersystem.views.form8new', name='form8new'),
     url(r'^vs/form8a/$', 'votersystem.views.form8aindex', name='form8aindex'),
     url(r'^vs/form8a/new/$', 'votersystem.views.form8anew', name='form8anew'),
-	url(r'^vs/avm/$', 'votersystem.views.avmregn', name='avmregn'),
-    
+    url(r'^vs/avm/$', 'votersystem.views.avmregn', name='avmregn'),
     url(r'^login$', 'django.contrib.auth.views.login'),
     url(r'^accounts/login/$', 'django.contrib.auth.views.login'),
     url(r'^accounts/logout/$', 'django.contrib.auth.views.logout'),
-)
+)

File application/votersystem/admin.py

 from django.contrib import admin
 from application.votersystem.models import Avm
 
+
 class AvmAdmin(admin.ModelAdmin):
     pass
 

File application/votersystem/forms.py

 from django.forms import ModelForm, TextInput, Textarea
 from models import Form7, Form8, Form8A, Avm
 
+
 class Form7Form(ModelForm):
 	class Meta:
 		model = Form7
 	class Meta:
 		model = Form8A
 
+
 class AvmForm(ModelForm):
 	class Meta:
 		model = Avm
 		exclude = ('inserted_timestamp', )
 		widgets = {
-            'name': TextInput(attrs={'size': 40}),
-            'address': Textarea(attrs={'cols': 40, 'rows': 4}),
-        }
+			'name': TextInput(attrs={'size': 40}),
+			'address': Textarea(attrs={'cols': 40, 'rows': 4}),
+		}

File application/votersystem/models.py

     kan_applicant_releations2 = models.CharField(max_length=765, blank=True)
     sent_to_ec = models.IntegerField(null=True, blank=True)
     sent_to_ec_date = models.DateTimeField(null=True, blank=True)
-    enrolled_in_other_constituency = models.TextField(blank=True) # This field type is a guess.
+    enrolled_in_other_constituency = models.TextField(blank=True)  # This field type is a guess.
     father_mother_husband_name = models.CharField(max_length=765)
     kan_father_mother_husband_name = models.CharField(max_length=765, blank=True)
     father_mother_husband_surname = models.CharField(max_length=765, blank=True)
 
     def __unicode__(self):
         return '%s' % (self.applicant_name, )
-    
+
     class Meta:
         db_table = u'form6'
 
+
 class Form7(models.Model):
     id = models.AutoField(primary_key=True)
     applicant_elector_id_card_number = models.CharField(max_length=765, blank=True)
     class Meta:
         db_table = u'form7'
 
+
 class Form8(models.Model):
     id = models.AutoField(primary_key=True)
     age_month = models.IntegerField(null=True, blank=True)
     applicant_serial_number = models.CharField(max_length=765)
     applicant_surname = models.CharField(max_length=765, blank=True)
     kan_applicant_surname = models.CharField(max_length=765, blank=True)
-    corrected_address = models.TextField(blank=True) # This field type is a guess.
-    corrected_age = models.TextField(blank=True) # This field type is a guess.
-    corrected_electoral_id_card_number = models.TextField(blank=True) # This field type is a guess.
-    corrected_father_name = models.TextField(blank=True) # This field type is a guess.
-    corrected_husband_name = models.TextField(blank=True) # This field type is a guess.
-    corrected_mother_name = models.TextField(blank=True) # This field type is a guess.
-    corrected_name = models.TextField(blank=True) # This field type is a guess.
-    corrected_sex = models.TextField(blank=True) # This field type is a guess.
+    corrected_address = models.TextField(blank=True)  # This field type is a guess.
+    corrected_age = models.TextField(blank=True)  # This field type is a guess.
+    corrected_electoral_id_card_number = models.TextField(blank=True)  # This field type is a guess.
+    corrected_father_name = models.TextField(blank=True)  # This field type is a guess.
+    corrected_husband_name = models.TextField(blank=True)  # This field type is a guess.
+    corrected_mother_name = models.TextField(blank=True)  # This field type is a guess.
+    corrected_name = models.TextField(blank=True)  # This field type is a guess.
+    corrected_sex = models.TextField(blank=True)  # This field type is a guess.
     created_at = models.DateTimeField(null=True, blank=True)
     created_by = models.CharField(max_length=765, blank=True)
     date_of_birth = models.DateTimeField(null=True, blank=True)
     class Meta:
         db_table = u'form8'
 
+
 class Form8A(models.Model):
     id = models.AutoField(primary_key=True)
     applicant_electoral_id_card_number = models.CharField(max_length=765, blank=True)
     class Meta:
         db_table = u'form8a'
 
+
 class Avm(models.Model):
     id = models.AutoField(primary_key=True)
     resident = models.BooleanField()