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 the templates inside django_basic_crud_generator/templates
├── APP_NAME
│   ├── 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
│         ├── __init__.py
│         ├── MODEL_NAME_list_test.py
│         ├── MODEL_NAME_create_test.py
│         ├── MODEL_NAME_detail_test.py
│         ├── MODEL_NAME_update_test.py
│         ├── MODEL_NAME_delete_test.py
│   ├── views
│      ├── MODEL_NAME
│         ├── __init__.py
│         ├── MODEL_NAME_list.py
│         ├── MODEL_NAME_create.py
│         ├── MODEL_NAME_detail.py
│         ├── MODEL_NAME_update.py
│         ├── MODEL_NAME_delete.py
│   │── urls.py

Installation:

Download the repository

git clone https://github.com/J-hanks/django_basic_crud_generator.git

Install using pip

pip install django_basic_crud_generator

Usage:

You must set app_name and model_name options

python -m django_basic_crud_generator --app_name YOUR_APP --model_name YOUR_MODEL

Options:

  • --app_name: Your Django application name
  • --model_name: Your Django model name you want crud generated

Manually fix urls file:

  • The urls.py file will need mannualy inspection

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.1.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

Django_Basic_CRUD_Generator-0.1-py3-none-any.whl (11.6 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