Skip to content

Commit

Permalink
Add a boolean column to investigate issue #360
Browse files Browse the repository at this point in the history
  • Loading branch information
jieter committed Jul 30, 2016
1 parent 2b217bc commit 520de5e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions example/app/migrations/0003_auto_20160730_0248.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-07-30 02:48
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('app', '0002_person_country'),
]

operations = [
migrations.AddField(
model_name='person',
name='friendly',
field=models.BooleanField(default=True),
),
migrations.AlterField(
model_name='country',
name='population',
field=models.PositiveIntegerField(verbose_name='population'),
),
]
1 change: 1 addition & 0 deletions example/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def summary(self):

class Person(models.Model):
name = models.CharField(max_length=200, verbose_name='full name')
friendly = models.BooleanField(default=True)

country = models.ForeignKey(Country, null=True)

Expand Down
1 change: 1 addition & 0 deletions example/app/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class BootstrapTable(tables.Table):
class Meta:
model = Person
template = 'django_tables2/bootstrap.html'
exclude = ('friendly', )


class PersonTable(tables.Table):
Expand Down

0 comments on commit 520de5e

Please sign in to comment.