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

Support for DurationField in schema mode #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support for DurationField in schema mode #125

wants to merge 1 commit into from

Conversation

vmspike
Copy link

@vmspike vmspike commented Jul 8, 2015

For now Django doesn't support str(timedelta) representation, so this patch provide correct conversion from timedelta to string.

Support for DurationField in schema mode
@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling f1d9bba on vmspike:feature into 3b235cb on djangonauts:master.

@vmspike
Copy link
Author

vmspike commented Jul 9, 2015

Also can you please provide short guide or key points of other fields support? Or is it too complex and there is no even rough instructions? I'm interested in FileField and ImageField, ForeignKey and ManyToMany (like ReferencesField, but in schema mode)?

@nemesifier
Copy link
Member

Hi @vmspike, thank you for contributing.

Have you noticed the build is failing?
The VirtualField implementation is quite an experimental feature, although version after version is improving a lot, but there's till some work to do in order to establish best practices and clean up the implementation.
Having some django core dev helping out would probably clarify many doubts I have and I hope in the near future I'll be able to separate the VirtualField implementation in a generic django package that can be used with other databases too (namely: mysql and sqlite).

Short answer: no instructions yet.

Regarding this feature, if you manage to add a proper failing unit test and fix the build for other django versions we can include this in the next release.
Please read:
http://djangonauts.github.io/django-hstore/#_developers_guide

@vmspike
Copy link
Author

vmspike commented Jul 13, 2015

Thanks for reply, got it.
Sorry for any inaccuracies, I'm newbie in python/django and it's my first pull request.
I'll try to find time to prepare the code in compliance with your rules.
But Django < 1.8 doesn't have DurationField in stock. What to do in this case? Add support only for django >= 1.8?

@nemesifier
Copy link
Member

Yes, the best thing would be to do conditional support. Take a look at other parts of the code where this is done.

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.

3 participants