Project Manager App اپ مدیر آنلاین
create a venv:
python -m venv venv
activate it in linux:
source ./venv/bin/avtivate
or activate it in windows:
./venv/Scripts/avtivate.bat
install requirement:
pip install -r requirements.txt
put your site root address,'/' , '/phoenix/' eg:
echo "SITE_URL='/'" >> phoenix/server_settings.py
or for special subdomain (for example '/phoenix/'):
echo "SITE_URL='/phoenix/'" >> phoenix/server_settings.py
generate and view secret key:
rm phoenix/secret_key.py
echo "SECRET_KEY_FROM_FILE = 'yj)%c-)__z_null-_l-ned!$6*cs)_=w@g&t=0vj^wg)knwm3z'" >> phoenix/secret_key.py
python manage.py djecrety
copy and put it in specific file:
vi phoenix/secret_key.py
put my sql db credential in files like right below:
[client]
database = your_database_name
host = your_host_name
user = your_user_name
password = your_password
default-character-set = utf8
for production:
rm phoenix/secret_my_sql.cnf
echo "[client]">> phoenix/secret_my_sql.cnf
echo "database = your_database_name">> phoenix/secret_my_sql.cnf
echo "host = your_host_name">> phoenix/secret_my_sql.cnf
echo "user = your_user_name">> phoenix/secret_my_sql.cnf
echo "password = your_password">> phoenix/secret_my_sql.cnf
echo "default-character-set = utf8" >> phoenix/secret_my_sql.cnf
migrate :
python manage.py migrate
create superuser :
python manage.py createsuperuser
collectstatic :
python manage.py collectstatic
update
source /home2/imenyarc/virtualenv/hames/3.7/bin/activate && cd /home2/imenyarc/hames && git pull origin master && python manage.py migrate && python manage.py collectstatic --no-input