Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for field default value #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

milkaknap
Copy link

Add support for default value like in django.db.models.fields.Field.
Example:

class MyModel(models.Model):
flags = BitField(flags=(...), default=('flaggy_foo', 'flaggy_bar'))

Add support for default value like in django.db.models.fields.Field. 
Example:

class MyModel(models.Model):
    flags = BitField(flags=(...), default=('flaggy_foo', 'flaggy_bar'))
@johnboiles
Copy link

Q: have you tested this with South migrations? South uses the default parameter when creating new columns.

@milkaknap
Copy link
Author

No, I haven't tested it with South migrations.

Correct indentation and bugfix (if value is tuple or list, it cannot be processed by BitHandler).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants