This is a simple script to automate CRUD operations based on Base Django by contraslash
- You have an existing django project with an app with a model to generate its crud
- You have a template called
base.htmland that template contains a block calledcontent - You have installed Base Django app and is already on
INSTALLED_APPSonsettings.py
You should invoque this script using simethin like this
cd your/app/path
python django-crud-generator.py --model_name ModelNameAfter run the script add a attribute to your model url_name = conf.<MODEL_NAME>_DETAIL_URL_NAME.
Be sure your path/to/application/urls.py is routed by the main urls.py file.
--model_prefix: Is used to prefix all configuration inconf.pyvariables for urls--url_pattern: Define the url pattern inside theurls.py--create_api: IfTruecreates an api based on Django Rest Framework