This is my personal website with an SPA blog.
It uses Django, Django-Rest-Framework, React-Redux with thunk and Webpack 3.
Django setup
- activate virtualenv
pip install -r requirements.txt- cd into
trydjango19/settings,
cp local_settings_default.py local_settings.py
- database setup (see below)
python src/manage.py migrate
Webpack setup Make sure Node.js 8.9.1+ is installed.
npm installnpm start(for production,npm run build)
Finally, after activating virtualenv
python src/manage.py runserver
- install mysql 5.7
mysql -uroot -pto log into mysql as root, run
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE schemaname;
GRANT ALL ON schemaname.* TO 'username'@'localhost';
Customize the above username, password, schemaname, and put corresponding values into local_settings.py
Customize everything in settings/local_settings.py, especially set DEBUG to False. Then
npm run build
python src/manage.py collectstatic
Finally restart server like Apache.
MIT
- migrate all js to ts
- disallow implicit in tsconfig
- Update React to v16.