thepratikguptaa / django

Learning and experimenting with Django.

Repository from Github https://github.comthepratikguptaa/djangoRepository from Github https://github.comthepratikguptaa/django

LinkedIn Post

LinkedIn Post

django

What is Django?

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. It takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel.

Django is a full-featured web framework that follows the Model-View-Controller (MVC) architectural pattern. It provides a set of tools and libraries for building web applications, including an ORM, a templating engine, and a built-in admin interface.

Environment Setup

To get started with Django, you’ll need to install Python and create a virtual environment. You can create a virtual environment using the following commands:

# Windows
python -m venv .venv
# Linux/MacOS
python3 -m venv .venv

But for this time, I used uv to manage virtual environment and other tools. It’s ridiculously easy and fast and cross-platform.

UV logo

Installing Django

Now that you have a virtual environment set up, you can install Django using the following command:

uv pip install django

Creating a Django Project

To create a Django project, you can use the following command:

django-admin startproject ProjectOne
cd ProjectOne

Running a Django development server

To start a Django development server, you can use the following command:

python manage.py runserver

πŸŽ‰ Happy Experimenting! πŸŽ‰

May your bugs be few and your features many!

Project Structure

└── πŸ“django
    └── πŸ“.vscode
        └── settings.json
    └── πŸ“ProjectOne
        └── πŸ“batman
            └── __init__.py
            └── πŸ“__pycache__
                └── __init__.cpython-313.pyc
                └── admin.cpython-313.pyc
                └── apps.cpython-313.pyc
                └── forms.cpython-313.pyc
                └── models.cpython-313.pyc
                └── urls.cpython-313.pyc
                └── views.cpython-313.pyc
            └── admin.py
            └── apps.py
            └── forms.py
            └── πŸ“migrations
                └── __init__.py
                └── πŸ“__pycache__
                    └── __init__.cpython-313.pyc
                    └── 0001_initial.cpython-313.pyc
                    └── 0002_savegotham_description.cpython-313.pyc
                    └── 0003_alter_savegotham_type.cpython-313.pyc
                    └── 0004_candidatereviews_specialability_villainalliances.cpython-313.pyc
                    └── 0005_rename_villains_villainalliances_hero_and_more.cpython-313.pyc
                    └── 0006_rename_hero_villainalliances_heros.cpython-313.pyc
                    └── 0007_heroesalliances_delete_villainalliances.cpython-313.pyc
                    └── 0008_rename_candidatereviews_candidatereview_and_more.cpython-313.pyc
                └── 0001_initial.py
                └── 0002_savegotham_description.py
                └── 0003_alter_savegotham_type.py
                └── 0004_candidatereviews_specialability_villainalliances.py
                └── 0005_rename_villains_villainalliances_hero_and_more.py
                └── 0006_rename_hero_villainalliances_heros.py
                └── 0007_heroesalliances_delete_villainalliances.py
                └── 0008_rename_candidatereviews_candidatereview_and_more.py
            └── models.py
            └── πŸ“templates
                └── πŸ“batman
                    └── im_batman.html
                    └── villains.html
                    └── weapon_details.html
            └── tests.py
            └── urls.py
            └── views.py
        └── db.sqlite3
        └── manage.py
        └── πŸ“media
            └── πŸ“save-gotham
                └── alfred_pennyworth_gJM3LhW.png
                └── alfred_pennyworth_NJRxiy4.png
                └── alfred_pennyworth.png
                └── bruce_wayne.png
                └── elon_musk_14Lb2aH.png
                └── elon_musk_9TurQhc.png
                └── elon_musk_hLvBVk7.png
                └── elon_musk.png
                └── github_shipit.png
        └── πŸ“ProjectOne
            └── __init__.py
            └── πŸ“__pycache__
                └── __init__.cpython-313.pyc
                └── settings.cpython-313.pyc
                └── urls.cpython-313.pyc
                └── views.cpython-313.pyc
                └── wsgi.cpython-313.pyc
            └── asgi.py
            └── settings.py
            └── urls.py
            └── views.py
            └── wsgi.py
        └── πŸ“static
            └── style.css
        └── πŸ“templates
            └── layout.html
            └── πŸ“website
                └── index.html
        └── πŸ“theme
            └── __init__.py
            └── πŸ“__pycache__
                └── __init__.cpython-313.pyc
                └── apps.cpython-313.pyc
            └── apps.py
            └── πŸ“static
            └── πŸ“static_src
                └── .gitignore
                └── package-lock.json
                └── package.json
                └── postcss.config.js
                └── πŸ“src
                    └── styles.css
                └── πŸ“css
            └── πŸ“templates
                └── base.html
    └── README.md

About

Learning and experimenting with Django.


Languages

Language:Python 79.1%Language:HTML 18.0%Language:CSS 2.3%Language:JavaScript 0.5%