In this episode, we build the foundation for all of the social networking aspects of the site. We're building off a lot of knowledge in this episode. What took us several screencasts to do for events, we're able to cover in a single screencast here.
Steps include creating the social graph django application, building out the models, adding a utility library for determining friendship between users, setting the new models up in the built-in admin, and modifying our settings file to account for the new app.
- Running Time: 14:04
Comments - 8 people have already said something. Join the discussion.
janr said…
You can get rid of that list comprehension if you use the QuerySet's values_list method:
UserLink.objects.filter(...).values_list('to_user', flat=True)
See http://docs.djangoproject.com/en/dev/ref/models/querysets/#values-list-fields
Eric Florenzano said…
janr: That's a really neat trick. Somehow that change went under my radar and I didn't even know about that. Thanks for the tip!
Björn said…
Just a quick TextMate question... how to you make that 80-character limit line appear so you know you've overshot it? Seems handy.
self said…
I'm willing to pay for this stuff. But then a little bit more documentation about what you do... This is realy great stuff.
Adehe.d said…
Björn, under the view menu , Wrap Column, select 78, then under the Textmate Preferences, general tab, tick on 'Show right margin indicator' and 'Highlight right margin'.
Eric Florenzano said…
Björn: What Adehe.d said :) It took me a while to figure that out too, and now I don't think I could live without it.
Adehe.d said…
hehe, well, I recently read the PEP 8 style guide for python and when I saw Eric using it in textmate I just had to figure it out. So lucky for you I had just done it 10 min before your asked :D
Paul said…
This site is awesome!