mirror of
https://github.com/thecyberlearn/chat-backend.git
synced 2026-08-18 07:52:53 +00:00
Features: - Django REST API backend - Multi-strategy web scraping system (Beautiful Soup, Playwright, Firecrawl) - Anti-detection features (proxy rotation, user-agent rotation) - Data export functionality (JSON, CSV, TXT) - Business and CrawledPage models - Enhanced crawling service with fallback mechanisms 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
745 B
Python
19 lines
745 B
Python
from django.contrib import admin
|
|
from .models import Business, CrawledPage
|
|
|
|
|
|
@admin.register(Business)
|
|
class BusinessAdmin(admin.ModelAdmin):
|
|
list_display = ['name', 'website_url', 'industry', 'status', 'total_pages', 'scraped_pages', 'created_by', 'created_at']
|
|
list_filter = ['status', 'industry', 'created_at']
|
|
search_fields = ['name', 'description', 'industry', 'website_url']
|
|
readonly_fields = ['total_pages', 'scraped_pages']
|
|
|
|
|
|
@admin.register(CrawledPage)
|
|
class CrawledPageAdmin(admin.ModelAdmin):
|
|
list_display = ['business', 'title', 'url', 'success', 'crawled_at']
|
|
list_filter = ['success', 'crawled_at']
|
|
search_fields = ['business__name', 'title', 'url', 'description']
|
|
readonly_fields = ['crawled_at']
|