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

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -