Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.72 KB

Readme.md

File metadata and controls

63 lines (41 loc) · 1.72 KB

Django ORM Learning Resources

Welcome to the Django ORM Learning Resources repository! This repository contains various resources and examples to help you get started with and master Django's Object-Relational Mapping (ORM) system.

Table of Contents

Introduction

Django's ORM provides a powerful and intuitive way to interact with your database using Python code. This repository is designed to offer a comprehensive set of resources for both beginners and advanced users to learn and enhance their skills with Django ORM.

Getting Started

To get started with Django ORM, you will need to have Python and Django installed on your machine. This repository includes various examples and exercises to help you understand how to use the ORM effectively.

Installation

  1. Clone the Repository

    git clone https://github.com/yourusername/django-orm-learning.git
    cd django-orm-learning
  2. Create a Virtual Environment

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install Dependencies

    pip install -r requirements.txt
  4. Set Up the Database

    python manage.py makemigrations
    python manage.py migrate

Usage

This repository contains useful ORM queries and its best practices for understanding Django ORM. To run the development server and explore the examples:

  1. Run your django server

    python manage.py runserver

    your app is available at http://localhost:8000

  2. Test your orm query

    python manage.py runorm