Getting Started With Django Oscar
Django Oscar is an ecommerce framework for Django. That sounds simple, but it is important to understand what kind of tool it is. Oscar is not just a shopping cart widget. It is a structured ecommerce foundation with opinions about catalogue data, baskets, checkout, orders, offers, partners, and dashboard management. If you want to build a serious ecommerce backend in Django, Oscar can give you a lot of the machinery. The tradeoff is that you need to learn its architecture instead of treating it like a small plugin.
The Mental Model
Think of Oscar as a set of Django apps that work together to model ecommerce. An ecommerce system is not one feature. It is several connected workflows:
- products
- product classes and attributes
- stock records
- pricing
- basket behavior
- checkout
- shipping
- payment
- orders
- offers and discounts
- customer accounts
- dashboard management Oscar gives you structure for those workflows. The main learning curve is understanding where each concern lives.
What Oscar Provides
Oscar includes many ecommerce building blocks:
| Area | Purpose |
| --- | --- |
| Catalogue | Products, categories, product classes, attributes |
| Basket | Cart behavior before checkout |
| Checkout | Order placement workflow |
| Order | Submitted orders and order lines |
| Partner | Stock records, fulfillment, supplier relationships |
| Offer | Discounts, vouchers, and promotions |
| Dashboard | Staff-facing management interface |
This is why Oscar is useful for custom ecommerce projects. You get a lot of domain structure without starting from zero.
Start With a Small Goal
The best way to learn Oscar is not to customize everything at once. Start with a small goal:
- create a project
- install Oscar according to the current docs
- run the migrations
- create a superuser
- open the dashboard
- add a simple product
- add it to a basket
- walk through checkout That path teaches the shape of the framework. Once you can complete a basic purchase flow locally, then start customizing.
Understand Product Classes
One of Oscar's important ideas is the product class. A product class describes what kind of product something is and what attributes it can have. For example: ```plain text Book author ISBN page count
T-Shirt size color material ``` This matters because ecommerce catalogues often need flexible product data. Not every product has the same fields. Oscar's catalogue system is built for that kind of variation.
Understand Stock Records
Oscar separates products from stock records. That can feel unusual at first. A product is what is being sold. A stock record describes availability, partner information, and pricing-related supply details. This separation is useful for marketplaces, supplier-backed catalogues, and ecommerce systems where product identity and stock availability are not the same thing. Even if your first store is simple, it is worth learning this distinction early.
Customizing Oscar
Oscar is designed to be customized. You will often hear about "forking" Oscar apps. In this context, forking means creating local versions of Oscar apps so you can override models, views, templates, forms, or behavior in a controlled way. The important rule is to customize intentionally. Before overriding something, find where the behavior currently lives:
- model
- manager
- view
- form
- strategy
- template
- signal Then change the smallest useful piece. This keeps the project easier to upgrade and debug.
Payment and Shipping
Payment and shipping are the parts where every real store becomes different. Oscar gives you checkout structure, but you still need to decide how your project handles:
- payment providers
- authorization and capture
- taxes
- shipping methods
- fulfillment rules
- refunds
- order status changes Do not treat payment as an afterthought. For a real production store, this is where careful design matters.
Common Mistakes
Mistake 1: Assuming Oscar is a tiny plugin
Oscar is a framework. It gives you a lot, but you need to understand its concepts.
Mistake 2: Customizing too early
Run the default flow first. If you customize before understanding the baseline, every bug becomes harder to diagnose.
Mistake 3: Ignoring the dashboard
Oscar's dashboard is part of the system. It is not just a demo admin. It is often where staff-facing catalogue and order workflows live.
Where This Shows Up in Real Projects
Oscar is useful when the ecommerce requirements are more custom than a hosted store can comfortably handle. Examples:
- complex catalogue structures
- supplier or partner-backed stock
- custom checkout rules
- B2B pricing
- dashboard workflows
- integration with internal systems If the store is very simple, Oscar may be more framework than you need. If the store has real backend complexity, Oscar can be a strong foundation.
Key Takeaways
- Django Oscar is an ecommerce framework, not just a cart plugin.
- Learn the default purchase flow before customizing.
- Understand catalogue, basket, checkout, order, partner, and dashboard concepts.
- Product classes and stock records are core ideas.
Customize in small, intentional steps.
Related Articles
Django Project Structure Explained
- Python Virtual Environments Explained
- How to Structure a Python Project