C:\>django-admin startproject my_projects
C:\>
The command django-admin startproject my_projects
creates a new Django project named my_projects
. It creates a new directory with the same name as the project and populates it with the necessary files and directories to start a new Django project.
The directory structure will include a manage.py file, a project-specific settings.py file, and other files and directories required for the project to run. This command is run in the command prompt on a Windows machine, specifically in the root directory (C:) in this case.
C:\>cd my_projects
C:\my_projects>dir
Volume in drive C is New Volume
Directory of C:\my_projects
07/26/2020 10:09 AM <DIR> .
07/26/2020 10:09 AM <DIR> ..
07/26/2020 10:09 AM 652 manage.py
07/26/2020 10:09 AM <DIR> my_projects
1 File(s) 652 bytes
3 Dir(s) 78,327,861,248 bytes free
C:\my_projects>
cd my_projects
: This command changes the current working directory to the "my_projects" directory created in the previous step.
dir
: This command lists the contents of the current directory, showing that it contains a subdirectory called "my_projects" and a file called "manage.py". The "my_projects" subdirectory is where the main Django project files are located, while "manage.py" is a script used to manage the project (e.g. running the development server, running tests, etc.).
C:\my_projects\my_projects>dir
Volume in drive C is New Volume
Directory of C:\my_projects\my_projects
07/26/2020 10:09 AM <DIR> .
07/26/2020 10:09 AM <DIR> ..
07/26/2020 10:09 AM 415 asgi.py
07/26/2020 10:09 AM 3,223 settings.py
07/26/2020 10:09 AM 774 urls.py
07/26/2020 10:09 AM 415 wsgi.py
07/26/2020 10:09 AM 0 __init__.py
5 File(s) 4,827 bytes
2 Dir(s) 77,955,743,744 bytes free
C:\my_projects\my_projects>
No comments:
Post a Comment