File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 28
28
```
29
29
1. git clone https://github.com/gowthamand/django-crud-ajax-login-register-fileupload
30
30
31
- 2. Change settings.py MYSQL CONFIGURATIONS (name, user, password)
31
+ 2. Change settings.py MYSQL CONFIGURATIONS (name, user, password) [Make sure to install mysqlclient: pip install mysqlclient]
32
32
33
33
3. cd django-crud-ajax-login-register-fileupload
34
34
Original file line number Diff line number Diff line change 73
73
# Database
74
74
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
75
75
76
+ # Use MySQL as the database backend
77
+ # Make sure to install mysqlclient: pip install mysqlclient
76
78
DATABASES = {
77
79
'default' : {
78
- 'ENGINE' : 'django.db.backends.sqlite3' ,
79
- 'NAME' : BASE_DIR / 'db.sqlite3' ,
80
+ 'ENGINE' : 'django.db.backends.mysql' ,
81
+ 'NAME' : 'your_db_name' , # Update this to your database name
82
+ 'USER' : 'your_db_user' , # Update this to your database user
83
+ 'PASSWORD' : 'your_db_password' , # Update this to your database password
84
+ 'HOST' : 'localhost' , # Set to your MySQL host, usually 'localhost'
85
+ 'PORT' : '3306' ,
80
86
}
81
87
}
82
-
83
88
# Password validation
84
89
# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators
85
90
You can’t perform that action at this time.
0 commit comments