top of page

django crud scaffolding script

Writer: Askao Ahmed SaadAskao Ahmed Saad

scaffold (views actions, templates, model_forms, routes) code for your models by few django shell commands scaffold cruds for your models as fast start for your project @authors: Askao Ahmed Saad && Mahmoud Samy @contact:ahmedsaadkhames@gmail.com - mahmoudsamy18@gmail.com

**requirements** - django project with apps containing models. - add the desired apps to settings.INSTALLED_APPS.**Running the application from shell**

- run django shell. ``` python manage.py shell ``` - run django_crud_scaffolding script. ``` import crud_scaffolding ``` - choose app number from your project installed apps list. ``` -------------------------------------------------------------------------------------------

Note >>>>any time you want to exit script , press Ctrl-C it kill process ,

all application in your project : 1 - test_app
PLZ , Enter number of app you want to scaffold its models :
<br>
- choose number of model you want to sacffold for it.
application you want to scaffold its models is (test_app) >>>
Models and its fields in your choosed application >>> 1 - Option ['useroption', 'created', u'id', 'value', 'name'] 2 - UserOption ['created', u'option_id', u'id', 'option', 'name']

PLZ , Enter model number you want to scaffold :

- choose which operation (action) you want to scaffold it's code.
choose operation you want to run on your chosed model (Option) >>> 1 - List all 2 - Add 3 - Edit 4 - Delete 5 - View 6 - All operations PLZ , Enter operation number you want to excute on ( Option ) :
<br>
- to exit the script at any time press Ctrl+C.

![print screen](http://askao.me/blog/wp-content/uploads/2016/12/Screenshot-from-2016-12-22-005643.png)
 
 
 

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page