Anik Das

May 08, 2025 • 1 min read

Django Start

🔧 1. Create a Virtual Environment with a Specific Python Version

To keep your Django project isolated and use a specific Python version (e.g., Python 3.13.3):

uv venv myenv --python 3.13.3
  • uv venv is an alternative to python -m venv, optimized for speed.

  • myenv is the name of the virtual environment.

  • --python 3.13.3 ensures the environment uses Python version 3.13.3 (must be installed on your system).

▶️ 2. Activate the Virtual Environment

source myenv/bin/activate
  • On Windows: myenv\Scripts\activate

  • This activates the isolated environment so packages don’t pollute your global Python install.

📦 3. Install Django

uv pip install django
  • uv pip is used for fast package installation within the virtual environment.

  • This installs the latest version of Django.

To verify installation:

django-admin --version

🏗️ 4. Create a Django Project

django-admin startproject core
  • Creates a new project named core with a default structure:

    core/
        manage.py
        core/
            __init__.py
            settings.py
            urls.py
            asgi.py
            wsgi.py
    

🧱 5. Create a Django App

Change into your project directory:

cd core

Create an app named admin:

python manage.py startapp admin
  • This creates a new app folder admin containing:

    admin/
        __init__.py
        admin.py
        apps.py
        migrations/
        models.py
        tests.py
        views.py
    

📝 Note: Avoid naming your app admin as Django already has an internal module named django.contrib.admin. Use something like customadmin or dashboard to prevent conflicts.


Join Anik on Peerlist!

Join amazing folks like Anik and thousands of other builders on Peerlist.

peerlist.io/

It’s available... this username is available! 😃

Claim your username before it's too late!

This username is already taken, you’re a little late.😐

0

1

0