start django project

  1. Open a terminal window.

  2. Navigate to the directory where you want to create your Django project.

  3. Run the following command to create a new Django project: django-admin startproject projectname

  4. Navigate into the newly created project directory: cd projectname

  5. Create a new Django app within the project: python manage.py startapp appname

  6. Open the settings.py file in the project directory and add the newly created app to the INSTALLED_APPS section.

  7. Apply initial database migrations: python manage.py migrate

  8. Create a superuser for the admin interface: python manage.py createsuperuser

  9. Follow the prompts to set up the superuser account.

  10. Start the development server: python manage.py runserver

  11. Open a web browser and go to http://127.0.0.1:8000/ to see your Django project in action.

  12. To access the admin interface, go to http://127.0.0.1:8000/admin/ and log in with the superuser credentials.

That's it! You've successfully started a Django project and created a basic app.