Django Faker Admin

Warning

This package is a work in progress, and not all features are implemented or tested intensively to make sure that it behaves as expected.

PyPI Version

A Django admin extension for creating fake data directly from the admin interface.

Features

  • Create fake data for your models directly from the Django admin interface

  • Customizable faker templates

  • Batch creation of fake objects

  • Custom admin views and templates

Installation

You can install Django Faker Admin via pip:

pip install -i https://test.pypi.org/simple/ django-faker-admin

Quick Start

  1. Add django_faker_admin before django.contrib.admin to your INSTALLED_APPS:

    INSTALLED_APPS = [
        ...
        'django_faker_admin',
        'django.contrib.admin',
        ...
    ]
    
  2. Use the provided admin mixins in your admin.py:

    from django.contrib import admin
    from django_faker_admin.mixins import FakerAdminMixin
    from .models import YourModel
    from .factories import YourModelFactory
    
    @admin.register(YourModel)
    class YourModelAdmin(FakerAdminMixin, admin.ModelAdmin):
        factory_class = YourModelFactory