Permalink
Browse files

cleaning up

  • Loading branch information...
OriHoch committed Feb 18, 2013
1 parent b9e16ac commit c608a557506197ed59a6f468c38df24c7f89b634
@@ -16,10 +16,10 @@ def forwards(self, orm):
# Adding field 'Bill.popular_name_slug'
db.add_column('laws_bill', 'popular_name_slug', self.gf('django.db.models.fields.CharField')(default='', max_length=1000, blank=True), keep_default=False)
- #for bill in orm.Bill.objects.all():
- # bill.slug = slugify_name(bill.title)
- # bill.popular_name_slug = slugify_name(bill.popular_name)
- # bill.save() # this will slugify what's needed
+ for bill in orm.Bill.objects.all():
+ bill.slug = slugify_name(bill.title)
+ bill.popular_name_slug = slugify_name(bill.popular_name)
+ bill.save() # this will slugify what's needed
def backwards(self, orm):
@@ -12,7 +12,7 @@ def forwards(self, orm):
db.alter_column('laws_bill', 'slug', self.gf('django.db.models.fields.SlugField')(max_length=1000))
# Adding index on 'Bill', fields ['slug']
- # db.create_index('laws_bill', ['slug'])
+ db.create_index('laws_bill', ['slug'])
def backwards(self, orm):
@@ -12,14 +12,14 @@ def forwards(self, orm):
db.add_column('links_link', 'active', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False)
# set 'active' field of all links to 'true'
- # for l in orm.Link.objects.all():
- # l.active = True
- # l.save()
+ for l in orm.Link.objects.all():
+ l.active = True
+ l.save()
# set links to 'parlament.co.il' inactive
- # for l in orm.Link.objects.filter(url__contains='parlament.co.il'):
- # l.active = False
- # l.save()
+ for l in orm.Link.objects.filter(url__contains='parlament.co.il'):
+ l.active = False
+ l.save()
def backwards(self, orm):
Binary file not shown.
Oops, something went wrong.

0 comments on commit c608a55

Please sign in to comment.