Scripts2026年7月22日·1 分钟阅读

Oscar — Domain-Driven E-Commerce Framework for Django

Full-featured, extensible e-commerce framework for Django that provides catalog management, checkout flows, offers, and payment integration.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Oscar
直接安装命令
npx -y tokrepo@latest install 09db542a-8566-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Oscar is a domain-driven e-commerce framework for Django. Rather than providing a fixed storefront, it gives developers a set of customizable e-commerce building blocks — catalog, checkout, basket, offers, and shipping — that can be extended or replaced to fit specific business requirements.

What Oscar Does

  • Manages product catalogs with categories, attributes, variants, and stock records
  • Provides a multi-step checkout flow with address handling and order placement
  • Implements a flexible offers and voucher engine for promotions and discounts
  • Handles basket management, wishlists, and saved-for-later functionality
  • Integrates with payment gateways via a pluggable payment interface

Architecture Overview

Oscar follows Django's app-based architecture. Each domain (catalog, checkout, basket, shipping, offers, customer) is a separate Django app with models, views, and templates. The framework uses a forking pattern: developers can fork any Oscar app into their project to override models, views, or templates without modifying Oscar's source. This allows deep customization while still receiving upstream updates for non-forked components.

Self-Hosting & Configuration

  • Install via pip and add Oscar's apps to your Django project's INSTALLED_APPS
  • Run migrations and the oscar_populate_countries management command for initial data
  • Fork individual Oscar apps into your project to customize models or business logic
  • Configure payment backends, shipping methods, and tax strategies in settings
  • Deploy as a standard Django application with your preferred WSGI/ASGI server

Key Features

  • App-forking customization model that allows overriding any component without modifying Oscar's source
  • Flexible offers engine supporting percentage, fixed amount, multibuy, and shipping discount types
  • Multi-currency and multi-language support for international storefronts
  • Dashboard admin interface for managing products, orders, offers, and customer accounts
  • Extensive test coverage and documentation covering common e-commerce patterns

Comparison with Similar Tools

  • Saleor — GraphQL-first headless commerce in Python; Oscar is tightly integrated with Django templates and views
  • Shuup — Django e-commerce with marketplace features; Oscar focuses on single-store customization depth
  • PrestaShop — PHP-based with its own admin; Oscar leverages the full Django ecosystem
  • Reaction Commerce — Node.js headless platform; Oscar is Python/Django-native
  • Solidus — Ruby on Rails commerce; Oscar provides a similar domain-driven approach for the Django ecosystem

FAQ

Q: What is app forking in Oscar? A: App forking copies an Oscar app (e.g., oscar.apps.catalogue) into your project so you can modify its models, views, or templates. Oscar's tooling handles the import redirection.

Q: Does Oscar support headless/API-first setups? A: Oscar includes django-oscar-api, a companion package that exposes RESTful endpoints for catalog, basket, and checkout operations.

Q: Can Oscar handle marketplace or multi-vendor scenarios? A: Oscar's core is single-vendor, but the partner/fulfillment model supports multiple stock sources. Full marketplace features require custom extensions.

Q: What payment gateways does Oscar support? A: Oscar provides a pluggable payment interface. Community packages exist for Stripe, PayPal, Adyen, and other providers.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产