changeset 1205:510ef3cbf3e6 modernize tip

Getting SG101 running on my macbook. This is the start of a branch to modernize the SG101 website.
author Brian Neal <bgneal@gmail.com>
date Sat, 04 Jan 2025 21:34:31 -0600
parents 061ccb003dad
children
files requirements.txt sg101/settings/base.py sg101/urls.py
diffstat 3 files changed, 36 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/requirements.txt	Sat Jan 04 21:29:31 2025 -0600
+++ b/requirements.txt	Sat Jan 04 21:34:31 2025 -0600
@@ -5,7 +5,7 @@
 boto==2.13.0
 celery==3.1.23
 Django==1.8.15
-django-haystack==2.4.1
+# TODO SEARCH django-haystack==2.4.1
 django-picklefield==0.3.1
 django-tagging==0.4
 docutils==0.10
@@ -19,7 +19,8 @@
 kombu==3.0.36
 lxml==3.4.2
 Markdown==2.5.1
-MySQL-python==1.2.5
+#MySQL-python==1.2.5
+mysqlclient
 oauth2client==1.4.1
 Pillow==2.7.0
 pyasn1==0.1.7
@@ -27,7 +28,7 @@
 python-dateutil==1.5
 python-memcached==1.48
 pytz==2015.2
-queued-search==2.1.0
+# TODO SEARCH queued-search==2.1.0
 redis==2.10.5
 repoze.timeago==0.5
 requests==2.7.0
--- a/sg101/settings/base.py	Sat Jan 04 21:29:31 2025 -0600
+++ b/sg101/settings/base.py	Sat Jan 04 21:34:31 2025 -0600
@@ -108,8 +108,8 @@
     'django.contrib.sites',
     'django.contrib.staticfiles',
     'elsewhere',
-    'haystack',
-    'queued_search',
+    #'haystack',
+    #'queued_search',
     'tagging',
     'accounts',
     'antispam',
@@ -122,7 +122,7 @@
     'contests',
     'core',
     'countdown',
-    'custom_search',
+    #'custom_search',
     'donations',
     'downloads',
     'forums',
--- a/sg101/urls.py	Sat Jan 04 21:29:31 2025 -0600
+++ b/sg101/urls.py	Sat Jan 04 21:34:31 2025 -0600
@@ -6,13 +6,13 @@
 from django.views.decorators.cache import cache_page
 from django.views.generic import TemplateView
 
-from haystack.views import search_view_factory
-from haystack.query import SearchQuerySet
+#from haystack.views import search_view_factory
+#from haystack.query import SearchQuerySet
 
 from news.feeds import LatestNewsFeed
 from forums.feeds import ForumsFeed
-from custom_search.forms import CustomModelSearchForm
-from custom_search.views import UserSearchView
+#from custom_search.forms import CustomModelSearchForm
+#from custom_search.views import UserSearchView
 from core.views import FixedView
 from sg101.views import HomePageView
 from sg101.views import StoreView
@@ -85,23 +85,32 @@
 ]
 
 # Haystack search views
-
-sqs = SearchQuerySet().order_by('-pub_date')
-
+#
+#sqs = SearchQuerySet().order_by('-pub_date')
+#
 urlpatterns += [
-    url(r'^search/$',
-        search_view_factory(view_class=UserSearchView,
-                            form_class=CustomModelSearchForm,
-                            searchqueryset=sqs,
-                            load_all=True),
-        name='haystack_search'),
-    url(r'^search/ajax/$',
-        search_view_factory(view_class=UserSearchView,
-                            template='search/search_ajax.html',
-                            form_class=CustomModelSearchForm,
-                            searchqueryset=sqs,
-                            load_all=True),
-        name='haystack_search_ajax'),
+#    url(r'^search/$',
+#        search_view_factory(view_class=UserSearchView,
+#                            form_class=CustomModelSearchForm,
+#                            searchqueryset=sqs,
+#                            load_all=True),
+#        name='haystack_search'),
+#    url(r'^search/ajax/$',
+#        search_view_factory(view_class=UserSearchView,
+#                            template='search/search_ajax.html',
+#                            form_class=CustomModelSearchForm,
+#                            searchqueryset=sqs,
+#                            load_all=True),
+#        name='haystack_search_ajax'),
+#
+# Temporary replacements:
+#
+   url(r'^search/$',
+       FixedView.as_view(title='About', content_template='fixed/about.html'),
+       name='haystack_search'),
+   url(r'^search/ajax/$',
+       FixedView.as_view(title='About', content_template='fixed/about.html'),
+       name='haystack_search_ajax'),
 ]
 
 # For serving media files in development only: