With ForeignKey fields, it works the other way, too, but it’s slightly
different due to the non-symmetrical nature of the relationship. To get a list
of books for a given publisher, use publisher.book_set.all(), like this:
Chapter 10: Advanced Models - 0 views
-
-
Making Changes to a Database Schema
-
Run manage.py sqlall [yourapp]
Chapter 8: Advanced Views and URLconfs - 0 views
-
Here, each view starts by checking that request.user is authenticated — that is, the current user has successfully logged into the site — and redirects to /accounts/login/ if not.
-
It would be nice if we could remove that bit of repetitive code from each of these views and just mark them as requiring authentication.
-
Now, we can remove the if not request.user.is_authenticated() checks from our views and simply wrap them with requires_login in our URLconf:
- ...3 more annotations...
Lifehacker - Top 10 Obscure Google Search Tricks - Feature - 0 views
-
Using a combination of advanced search operators that specify music files available in an Apache directory listing, you can turn Google into your personal Napster. Go ahead, try this search for Nirvana tracks: -inurl:(htm|html|php) intitle:"index of" +"last modified" +"parent directory" +description +size +(wma|mp3) "Nirvana". (Sub out Nirvana for the band you're interested in; use this one in conjunction with number 7 to find new music, too.) The same type of search recipe can find comic books as well.
1 - 6 of 6
Showing 20▼ items per page