django-admin fixture generator command

Overview

Mockango

for short mockango is django fixture generator command which help you have data without pain for test development

requirements

pip install django
pip install mimesis
pip install pyyaml
pip install colorama

installation

pip intall mockango
INSTALLED_APPS = [
  ...
  'mockango',
]

usage

app_labels(positional): labels of app you need fixture data for them

--num(optional)(default=10): number of object generate for each model

--foramt(optional)(default=yaml): format of fixture file

--locale(optional)(default=en): supported mimesis locales

python manage.py generatedata posts --num 5 --format yaml --locale fa

examples

models.py

class Post(models.Model):
  title = models.Charfield(max_length=200)
  text = models.TextField()
  is_publish = models.BooleanField(default=False)
  published_date = models.DateTimeField()
  CATEGORIES = [
    ('T', 'Tutorail'),
    ('N', 'Normal'),
    ]
  category = models.CharField(max_length=1, choices=CATEGORIES)

settings.py

INSTALLED_APPS = [
  ...
  'mockango',
  'posts',
]
python manage.py generatedata posts --num 5

posts/fixture/post/fixture_file.yaml

- fields:
    category: T
    is_publish: false
    published_date: 2018-02-21 05:29:26.253161
    text: Messages can be sent to and received from ports, but these messages must
      obey the so-called "port protocol." It is also a garbage-collected runtime system.
      Atoms can contain any character if they are enclosed within single quotes and
      an escape convention exists which allows any character to be used within an
      atom. The syntax {D1,D2,...,Dn} denotes a tuple whose arguments are D1, D2,
      ... Dn. Do you come here often?
    title: Messages can be sent to and received from ports, but these messages must
      obey the so-called "port protocol."
  model: posts.post
  pk: 1
- fields:
    category: N
    is_publish: false
    published_date: 2009-01-25 08:37:08.793574
    text: She spent her earliest years reading classic literature, and writing poetry.
      Do you have any idea why this is not working? Any element of a tuple can be
      accessed in constant time. Its main implementation is the Glasgow Haskell Compiler.
      Tuples are containers for a fixed number of Erlang data types.
    title: They are written as strings of consecutive alphanumeric characters, the
      first character being lowercase.
  model: posts.post
  pk: 2
- fields:
    category: T
    is_publish: false
    published_date: 2013-01-03 11:28:01.825650
    text: He looked inquisitively at his keyboard and wrote another sentence. Any
      element of a tuple can be accessed in constant time. Haskell is a standardized,
      general-purpose purely functional programming language, with non-strict semantics
      and strong static typing. Atoms are used within a program to denote distinguished
      values. Atoms can contain any character if they are enclosed within single quotes
      and an escape convention exists which allows any character to be used within
      an atom.
    title: They are written as strings of consecutive alphanumeric characters, the
      first character being lowercase.
  model: posts.post
  pk: 3
- fields:
    category: T
    is_publish: false
    published_date: 2006-06-24 11:19:25.527136
    text: Haskell features a type system with type inference and lazy evaluation.
      It is also a garbage-collected runtime system. Messages can be sent to and received
      from ports, but these messages must obey the so-called "port protocol." The
      sequential subset of Erlang supports eager evaluation, single assignment, and
      dynamic typing. Tuples are containers for a fixed number of Erlang data types.
    title: The syntax {D1,D2,...,Dn} denotes a tuple whose arguments are D1, D2, ...
      Dn.
  model: posts.post
  pk: 4
- fields:
    category: T
    is_publish: true
    published_date: 2006-10-17 12:10:48.115520
    text: Tuples are containers for a fixed number of Erlang data types. It is also
      a garbage-collected runtime system. He looked inquisitively at his keyboard
      and wrote another sentence. The Galactic Empire is nearing completion of the
      Death Star, a space station with the power to destroy entire planets. Messages
      can be sent to and received from ports, but these messages must obey the so-called
      "port protocol."
    title: Ports are created with the built-in function open_port.
  model: posts.post
  pk: 5

If You Find It Useful

give it one star, make issue if you find something missing, share with your friends

Thanks :)

Code to reproduce experiments in the paper "Task-Oriented Dialogue as Dataflow Synthesis" (TACL 2020).

Code to reproduce experiments in the paper "Task-Oriented Dialogue as Dataflow Synthesis" (TACL 2020).

Microsoft 274 Dec 28, 2022
EOD (Easy and Efficient Object Detection) is a general object detection model production framework.

EOD (Easy and Efficient Object Detection) is a general object detection model production framework.

383 Jan 07, 2023
:honey_pot: A fake Django admin login screen page.

django-admin-honeypot django-admin-honeypot is a fake Django admin login screen to log and notify admins of attempted unauthorized access. This app wa

Derek Payton 907 Dec 31, 2022
Material design for django administration

Django Material Administration Quick start pip install django-material-admin Add material.admin and material.admin.default to your INSTALLED_APPS sett

Anton 279 Jan 05, 2023
Freqtrade is a free and open source crypto trading bot written in Python

Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram. It contains backtesting, plotting and money man

20.2k Jan 02, 2023
Django Smuggler is a pluggable application for Django Web Framework that helps you to import/export fixtures via the automatically-generated administration interface.

Django Smuggler Django Smuggler is a pluggable application for Django Web Framework to easily dump/load fixtures via the automatically-generated admin

semente 373 Dec 26, 2022
A cool, modern and responsive django admin application based on bootstrap 5

django-baton A cool, modern and responsive django admin application based on bootstrap 5 Documentation: readthedocs Live Demo Now you can try django-b

Otto srl 678 Jan 01, 2023
Python code for "Machine learning: a probabilistic perspective" (2nd edition)

Python code for "Machine learning: a probabilistic perspective" (2nd edition)

Probabilistic machine learning 5.3k Dec 31, 2022
A configurable set of panels that display various debug information about the current request/response.

Django Debug Toolbar The Django Debug Toolbar is a configurable set of panels that display various debug information about the current request/respons

Jazzband 7.3k Dec 31, 2022
Legacy django jet rebooted , supports only Django 3

Django JET Reboot Rebooting the original project : django-jet. Django Jet is modern template for Django admin interface with improved functionality. W

215 Dec 31, 2022
Ajenti Core and stock plugins

Ajenti is a Linux & BSD modular server admin panel. Ajenti 2 provides a new interface and a better architecture, developed with Python3 and AngularJS.

Ajenti Project 7k Jan 07, 2023
Nginx UI allows you to access and modify the nginx configurations files without cli.

nginx ui Table of Contents nginx ui Introduction Setup Example Docker UI Authentication Configure the auth file Configure nginx Introduction We use ng

David Schenk 4.3k Dec 31, 2022
Awesome Video Datasets

Awesome Video Datasets

Yunhua Zhang 462 Jan 02, 2023
BitcartCC is a platform for merchants, users and developers which offers easy setup and use.

BitcartCC is a platform for merchants, users and developers which offers easy setup and use.

BitcartCC 270 Jan 07, 2023
With Django Hijack, admins can log in and work on behalf of other users without having to know their credentials.

Django Hijack With Django Hijack, admins can log in and work on behalf of other users without having to know their credentials. Docs See http://django

1.2k Jan 05, 2023
The script that able to find admin panels

admin_panel_finder The script will try to request possible admin panels by reading possible admin panels url then report as 200 YES or 404 NO usage: p

E-Pegasus 3 Mar 09, 2022
A curated list of the latest breakthroughs in AI by release date with a clear video explanation, link to a more in-depth article, and code.

A curated list of the latest breakthroughs in AI by release date with a clear video explanation, link to a more in-depth article, and code

Louis-François Bouchard 2.9k Jan 08, 2023
Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.

Xadmin Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap. Liv

差沙 4.7k Dec 31, 2022
Jazzy theme for Django

Django jazzmin (Jazzy Admin) Drop-in theme for django admin, that utilises AdminLTE 3 & Bootstrap 4 to make yo' admin look jazzy Installation pip inst

David Farrington 1.2k Jan 08, 2023
A Django admin theme using Twitter Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed apps.

django-admin-bootstrapped A Django admin theme using Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed ap

1.6k Dec 28, 2022