Skip to main content

Script to generate views, templates and tests files for a given Django Model

Project description

Django Basic Crud Generator


  • Django Basic CRUD Generator is a simple python script to generate views, templates and tests files for a given Django Model.
  • The Script will generate the following files, using as base these templates files
│   ├── templates
│      ├── MODEL_NAME
│         ├── MODEL_NAME_list.html
│         ├── MODEL_NAME_create.html
│         ├── MODEL_NAME_detail.html
│         ├── MODEL_NAME_update.html
│         ├── MODEL_NAME_delete.html
│   ├── tests
│      ├── MODEL_NAME
│         ├──
│         ├──
│         ├──
│         ├──
│         ├──
│         ├──
│   ├── views
│      ├── MODEL_NAME
│         ├──
│         ├──
│         ├──
│         ├──
│         ├──
│         ├──
│   │──


Download the repository

git clone

Install using pip

pip install django_basic_crud_generator


You can call the script anywhere set app_name and model_name options are Required

python -m django_basic_crud_generator --app_name MY_APP --model_name MY_MODEL

You can also import in your python scripts to generate files programatically.

import django_basic_crud_generator


  • --app_name: Your Django application name
  • --model_name: Your Django model name you want crud generated
  • --use_template_layout: Set this flag to system render templates files using this layout file
  • --override_templates: Set the override templates folder. Ex: --override_templates MY_TEMPLATES_FOLDER

Manually fix urls file:

  • The file will need mannualy inspection
  • Make sure you included you app urls in your project level file.
  • If you only use project level, copy the contents of generated app to your project level file


You can see examples of generated files here

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Django Basic CRUD Generator-0.2.tar.gz (10.2 kB view hashes)

Uploaded Source

Built Distribution

Django_Basic_CRUD_Generator-0.2-py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page