from django.conf.urls.defaults import *
from django.views.generic import list_detail
from mysite.books.models import Publisher
publisher_info = {
'queryset': Publisher.objects.all(),
'template_name': 'publisher_list_page.html',
}
urlpatterns = patterns('',
(r'^publishers/$', list_detail.object_list, publisher_info)
)
Chapter 11: Generic Views - 0 views
-
-
That’s really all there is to it. All the cool features of generic views come from changing the “info” dictionary passed to the generic view.
-
You might have noticed that sample publisher list template stores all the books in a variable named object_list.
- ...10 more annotations...
http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html - 0 views
-
We can count how often a word occurs in a tex
-
Adding two lists creates a new list
-
count the occurrences of a particular word using text1.count('heaven')
- ...18 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.
http://nltk.googlecode.com/svn/trunk/doc/book/ch02.html - 0 views
-
Loading your own Corpus If you have a collection of text files that you would like to access using the above methods, you can easily load them with the help of NLTK's PlaintextCorpusReader as follows:
bookgoo - Highlight the World - 1 views
Patterns - Ajax Patterns - 0 views
Chapter 10: Advanced Models - 0 views
-
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:
-
Making Changes to a Database Schema
-
Run manage.py sqlall [yourapp]
Help - 0 views
1 - 15 of 15
Showing 20▼ items per page
'; }