Skip to content

Fix: Use manage.py instead of django-admin to start app for better project context safety #1180

Description

@hasdajustin

The current documentation (or example) uses the command django-admin startapp <app_name> to create a new Django app. While this works, it may cause unexpected issues when executed outside the Django project directory or virtual environment.
To ensure the app is created within the correct project context (especially when settings need to be loaded or project-specific paths are required), it is recommended to use:
python manage.py startapp <app_name>
This command ensures that the Django project’s environment and settings are correctly loaded during app creation, preventing potential configuration issues.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions