Skip to content

khaicm-0897/brs

Repository files navigation

Django Project Training

SUN* has many technical books that all employees can read. To manage and use them effectively, the management and reviewing system is needed.

Getting Started

Prerequisites

  • OS: Linux/MacOS
  • Database: PostgreSQL, MongoDb
  • Github

Installing

  • Installing Python 3.7.x
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
tar -zxvf Python-3.7.4.tar.xz
cd Python-3.7.4
./configure
make
make test
sudo make install
rm Python-3.7.4.tar.xz && rm -rf Python-3.7.4
  • Installing python pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
rm get-pip.py
  • Install virtualenv
sudo pip install virtualenv

Configuration

Clone code

https://github.com/minhhh-0927/brs.git
cd brs

Create virtual environment

virtualenv venv -p python3

Activate vitual environment and install python dependencies

source venv/bin/activate
pip install -r requirements.txt

Config variable environment

cp .env.example .env

You need create a database. Then, put data infomation into .env file

Running the tests

Migrate database

python manage.py migrate

Run server

python manage.py runserver

And coding style tests

Updating

Deployment

Create static folder. Example:

cd brs
mkdir root_static

Put name root_static into .env file.

Collectstatic

$ python manage.py collectstatic
1986 static files copied to '/Users/minhhahao/workspace/first-project-training/brs/root_static'.

Config project path and log in uwsgi.ini

base=path-to-project
daemonize=path-to-log-file

Run code in server

uwsgi --ini uwsgi.ini

Built With

  • Django - The web framework used
  • Pip - Dependency Management
  • Heroku - Cloud Application Platform
  • PostgreSQL - The world's most advanced open source database

Contributing

Updating

Versioning

Updating

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

First Project Training

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published