Django url from a huge list of words from a file -
i have file 60,000 words, need url valid when contains of words in file
url(r'^site/keyword/$', 'mysite.views.home')
so need keyword 1 of words present in file.
i know can use pipe multiple words list large that
don't in url; in view.
def my_view(request, word): if word not in words: raise http404()
for best performance, words should set defined @ module level.
Comments
Post a Comment