pip install virtualenv
virtualenv env_name
env_name\Scripts\activate
pip install django
django-admin --version
django-admin startproject project_name
python manage.py startapp app_name
INSTALLED_APPS
list in the project’s settings.py
file.python manage.py createsuperuser
python manage.py runserver
http://127.0.0.1:8000/admin/
http://127.0.0.1:8000/
python manage.py runserver
python manage.py makemigrations
python manage.py migrate
python manage.py check
import requests
response = requests.get("https://api.example.com/users")
print(response.json())
AssertionError
is raised.True
, the program continues execution. If it evaluates to False
, an AssertionError
is raised, optionally with a custom error message.assert condition, "Optional error message"
x = 10
assert x > 5, "x should be greater than 5"
unittest
or pytest
frameworks for automated API testing.git init
: Initialize a repository.git add
: Stage changes for commit.git commit
: Save changes.git push
: Upload changes to a remote repository.INSERT INTO users (id, name) VALUES (1, 'John Doe');
SELECT * FROM users;
UPDATE users SET name = 'Alice Wilson' WHERE id = 1;
DELETE FROM users WHERE id = 1;
Made By SOU Student for SOU Students