https://github.com/contraslash/django-crud-generator
CRUD generator for Django Framework
https://github.com/contraslash/django-crud-generator
Last synced: 2 months ago
JSON representation
CRUD generator for Django Framework
- Host: GitHub
- URL: https://github.com/contraslash/django-crud-generator
- Owner: contraslash
- License: mit
- Created: 2017-07-11T15:11:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-02T14:59:46.000Z (almost 6 years ago)
- Last Synced: 2025-09-21T20:44:13.255Z (9 months ago)
- Language: Python
- Homepage: https://django-crud-generator.readthedocs.io/en/latest/
- Size: 39.1 KB
- Stars: 7
- Watchers: 2
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django CRUD Generator
[](https://pypi.org/project/django-crud-generator)
This is a simple script to automate CRUD operations based on [Base Django](https://git.contraslash.com/ma0/base-django)
by [contraslash](https://contraslash.com)
## Prerequisites:
- You have an existing django project with an app with a model to generate its crud
- You have a template called `base.html` and that template contains a block called `content`
- You have installed [Base Django app](https://git.contraslash.com/ma0/base-django) and is already on `INSTALLED_APPS` on `settings.py`
## Usage:
You should invoque this script using simethin like this
```bash
cd your/app/path
python django-crud-generator.py --model_name ModelName
```
After run the script add a attribute to your model `url_name = conf._DETAIL_URL_NAME`.
Be sure your `path/to/application/urls.py` is routed by the main `urls.py` file.
## Options:
- `--model_prefix`: Is used to prefix all configuration in `conf.py` variables for urls
- `--url_pattern`: Define the url pattern inside the `urls.py`
- `--create_api`: If `True` creates an api based on [Django Rest Framework](http://www.django-rest-framework.org/)