annotate ygroup/urls.py @ 943:cf9918328c64

Haystack tweaks for Django 1.7.7. I had to upgrade to Haystack 2.3.1 to get it to work with Django 1.7.7. I also had to update the Xapian backend. But I ran into problems. On my laptop anyway (Ubuntu 14.0.4), xapian gets mad when search terms are greater than 245 chars (or something) when indexing. So I created a custom field that would simply omit terms greater than 64 chars and used this field everywhere I previously used a CharField. Secondly, the custom search form was broken now. Something changed in the Xapian backend and exact searches stopped working. Fortunately the auto_query (which I was using originally and broke during an upgrade) started working again. So I cut the search form back over to doing an auto_query. I kept the form the same (3 fields) because I didn't want to change the form and I think it's better that way.
author Brian Neal <bgneal@gmail.com>
date Wed, 13 May 2015 20:25:07 -0500
parents ee87ea74d46b
children 5ba2508939f7
rev   line source
bgneal@323 1 """
bgneal@323 2 urls.py - URLs for the ygroup application.
bgneal@323 3
bgneal@323 4 """
bgneal@574 5 from django.conf.urls import patterns, url
bgneal@574 6 from django.views.generic import DetailView
bgneal@323 7
bgneal@574 8 from ygroup.models import Post
bgneal@323 9 from ygroup.views import ThreadIndexView, ThreadView
bgneal@323 10
bgneal@323 11
bgneal@323 12 urlpatterns = patterns('',
bgneal@323 13 url(r'^threads/$',
bgneal@323 14 ThreadIndexView.as_view(),
bgneal@323 15 name='ygroup-thread_index'),
bgneal@323 16 url(r'^thread/(\d+)/$',
bgneal@323 17 ThreadView.as_view(),
bgneal@323 18 name='ygroup-thread_view'),
bgneal@323 19 url(r'^post/(?P<pk>\d+)/$',
bgneal@323 20 DetailView.as_view(model=Post, context_object_name='post'),
bgneal@323 21 name='ygroup-post_view'),
bgneal@323 22 )
bgneal@323 23