python cli package for creating django models and views in a single command.
Pull the code from github and install dj through setup.py
.
$ cd dj
$ python setup.py install
dj list
-
cd into the django project (ie, into the directory where
manage.py
exists) -
Command format for creating new model.
dj create model <model-name> <app-name>
we can use c
for create
and m
for model in the above format.
- The below command will create a new model
Book
insidestudent
app.
dj c m Book student
dj c v BookView student