-
Notifications
You must be signed in to change notification settings - Fork 56
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
more data importing + JSONField #34
Conversation
Great! I don't think we can justify calling
I think defining help text for each of the fields would be great, but I'm not sure that we should truncate the model's docstring as it is more readily available to developers than help texts are. |
Back to Fandjango :)
Importing stuff like facebook "likes" or exact location in one line is not so easy, but solved with list comprehensions. As you told, calling Additionally, I've added some properties: age and different sizes of user pictures. |
I really like where you're going with this, but I think there are a few problems with its implementation.
I think we would benefit from converting each of these fields (and some of the existing ones, too) to properties:
This approach guarantees that the information is up-to-date, and it's completely transparent to the developer. What do you think? |
Cool idea, I did not think about caching possibility, it solves the problem of query cost. The only problem left is filtering on those properties. Its safe for my new fields like movies, books and so on, however could be a problem for others. For example, I'd like to make possible ORM-level filtering by users language. However languages are currently just comma-separated list anyway... Actually it depends on the kind of application, like if its just displaying facebook data then its ok, but if its importing data and then provides forms for editing, properties might lead to problems, as everything has to be copied and safely stored to some other model. Regarding compatibility issue - sure, I will take a look. |
You make a compelling argument, but at the end of the day I don't think filtering by or editing a user's preferences (e.g. likes, games or music) is a common use case and so it probably isn't worth the complexity it would incur to facilitate it. As for the compatibility issue, don't fret it unless you really can't wait until the next major version; it should be production-ready within a few weeks. |
I've converted some of the existing fields to cached properties in fa5aff8. |
Yes, Anyway, I will probably work on my fork stuff this Thursday to make it ready for merge in your next major version |
I'm closing this pull request, as the changes it introduces are now features of the next major version (albeit with a slithtly different implementation). |
Hello,
I've added dependency on JSONField and implemented some more importing.
Since I would like to stay within fandjango upstream, I have few questions about code: