Django · models.py · test data

Test data for Django — straight from your models.py.

Paste or push your models.py and get a populated database where every ForeignKey resolves. Abstract base classes, mixin inheritance, ForeignKey("self") and Django's implicit id PKs are handled — tested against a real 20-app project with 226 models.

Free tier · no card · EU-hosted · zero trackers

From Django schema to populated database

Paste your models.py in the web app, push your whole project with the VS Code or PyCharm plugin, or use the CLI. The parser resolves Django's inheritance chain transitively: abstract bases merge their fields into every child, mixin-only models are detected, and the implicit auto id primary key is added so foreign keys have something to point at.

models.py in — SQL out
class Beehive(TimestampMixin, SoftDeleteMixin):
    name = models.CharField(max_length=120)
    owner = models.ForeignKey(User, on_delete=models.CASCADE)

# → INSERT INTO "user" ... 200 rows
# → INSERT INTO "beehive" ... owner_id always resolves,
#   2–19 hives per owner, long-tail distributed

What you get

FK-consistent

Every foreign key resolves

Children reference parents that exist — including self-references (parent_id) and one-to-one relations. Inserts come out in topological order, so the SQL loads into a constrained schema as-is.

realistic

Distributions like real life

Not every user has exactly 5 orders: long-tail and normal distributions create the skew where pagination and N+1 bugs actually show up.

current

Time-aware data

Timestamps generate relative to today — "last 30 days" dashboards stay populated instead of going empty as fixtures age.

reproducible

Deterministic per seed

Same seed, same data — reproducible CI runs. Export the generation config as JSON and commit it next to your migrations.

editor

VS Code & PyCharm plugins

Push every models.py in your project to SeedBase in one click — the schema lands parsed and ready to generate.

FAQ

Does it handle abstract models and mixins?

Yes. Abstract base classes (Meta: abstract = True) don't become tables, but their fields merge into every inheriting model — including models that inherit only from mixins and never mention models.Model directly.

What about ForeignKey("self")?

Self-referencing foreign keys generate trees: rows reference earlier rows of the same table, nullable self-FKs get NULL roots, and there are no forward references — the SQL loads row by row with constraints enabled.

How is this different from factory_boy?

factory_boy generates objects inside a test run — the right tool for pytest fixtures. SeedBase produces a dataset (SQL/CSV/JSON) for dev databases, staging, demos and CI containers, without writing or maintaining per-model factories. More on the library comparison →

Can I load the data into Postgres or MySQL directly?

Yes — download SQL/CSV/JSON or push directly into a Postgres/MySQL connection. Inserts are emitted in topological FK order, so constrained schemas load without reordering.

Two minutes to a fully populated database

Sign up, import your schema, generate. No sales call, no credit card — the free tier is enough for a real first impression.

  • FK-consistent
  • Realistic distributions
  • SQL / CSV / JSON
  • EU-hosted
Start free