Open sd4-github opened 2 hours ago
(venv) soumikd4@soumik-lenovo:~/code/pyEnv$ django-admin --version
5.1.2
(venv) soumikd4@soumik-lenovo:~/code/pyEnv$ pip show djangorestframework
Name: djangorestframework
Version: 3.15.2
Summary: Web APIs for Django, made easy.
Home-page: https://www.django-rest-framework.org/
Author: Tom Christie
Author-email: tom@tomchristie.com
License: BSD
Location: /home/soumikd4/code/pyEnv/venv/lib/python3.12/site-packages
Requires: django
Required-by:
(venv) soumikd4@soumik-lenovo:~/code/pyEnv$ pip freeze
asgiref==3.8.1
Django==5.1.2
djangorestframework==3.15.2
sqlparse==0.5.1
(venv) soumikd4@soumik-lenovo:~/code/django/drfProject$ python3 manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying sessions.0001_initial... OK
(venv) soumikd4@soumik-lenovo:~/code/django/drfProject$
(venv) soumikd4@soumik-lenovo:~/code/django/drfProject$ python3 manage.py createsuperuser
Username (leave blank to use 'soumikd4'): soumik
Email address:
Password:
Password (again):
Error: Blank passwords aren't allowed.
Password:
Password (again):
The password is too similar to the username.
This password is too short. It must contain at least 8 characters.
Bypass password validation and create user anyway? [y/N]: y
Superuser created successfully.
File "/home/soumikd4/code/pyEnv/venv/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 354, in execute
return super().execute(query, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.OperationalError: no such table: myapp_student
(venv) soumikd4@soumik-lenovo:~/code/django/drfProject$ python3 manage.py makemigrations
Migrations for 'myapp':
myapp/migrations/0001_initial.py
+ Create model Student
(venv) soumikd4@soumik-lenovo:~/code/django/drfProject$ python3 manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, myapp, sessions
Running migrations:
Applying myapp.0001_initial... OK
activate virtual env
soumikd4@soumik-lenovo:~/code/pyEnv$ source venv/bin/activate
(venv) soumikd4@soumik-lenovo:~/code/pyEnv$