DEV Community

Vicente G. Reyes
Vicente G. Reyes

Posted on • Updated on • Originally published at vicentereyes.org

django-admin startapp v/s python manage.py startapp

django-admin startapp and python manage.py startapp are both commands used to create a new Django app within a project. However, they are executed differently.

django-admin is a command-line tool that allows you to execute various Django-related tasks, including creating a new app. To create a new app using django-admin, you would enter the following command in your terminal:

django-admin startapp <app_name>
Enter fullscreen mode Exit fullscreen mode

On the other hand, python manage.py is a command-line tool that is specific to the Django project you are currently working on. It allows you to execute various project-related tasks, including creating a new app. To create a new app using python manage.py, you would enter the following command in your terminal:

python manage.py startapp <app_name>
Enter fullscreen mode Exit fullscreen mode

Both commands will create a new Django app with the specified name. However, python manage.py startapp is the recommended way to create a new app within a Django project, as it ensures that the app is created within the context of the project and with the appropriate project settings.

Top comments (0)