Clone repository
git clone https://github.com/Anhduchb01/BDSWeb
cd BDSWeb
Create new Python environment with Python 3.9 by conda
conda create -n realEstate python=3.9
conda activate realEstate
pip install -r requirements.txt
pip install mysqlclient==2.1.1
Install HomeBrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install mysqlclient through HomeBrew
brew install mysql
pip install mysqlclient
pip install requirements.txt
Running MySQL
brew services start mysql
https://drive.google.com/drive/folders/1dGFCD7Hw0-KuODM3o5RTji7niIs1dcdg?usp=sharing
https://drive.google.com/drive/folders/1wcWnIX7KKhMz7A3as68t6oRIA41imSZO?usp=sharing
Then, create new folder Image at BDSWeb/
then move Image folder to BDSWeb/images
Result example: BDSWeb/images/baidang
https://www.apachefriends.org/download.html
Install and run XamPPControl.
Running two servers: MySQL Database and Apache Web Server. Then, go to following link.
http://localhost/phpmyadmin
Click to the import tab, then choose file diachi.sql
at BDSWeb/diachi.sql
Go to BDSWeb/BDSWeb/setting.py
change PASSWORD
to " and PORT
default is '3306'
python manage.py runserver
Open configure file MySQL server on XamPP, then take socket path of MySQL. Then do the following code.
ln -s /this/is/your/MySQL/socket/path /tmp/mysql.sock
brew services restarts mysql
python manage.py runserver