Something about the project.
Tools we use
- Make sure you have Python 3.x and pip installed.
- NodeJS.
- Angular CLI.
- Google Cloud Platform.
Client
npm install
inside theclient
directory.- Open the browser at http://localhost:4200.
Server
- Install requirements with
pip install -r requirements.txt
(located underserver
directory). cd server/config
thencp local_settings.template local_settings.py
and modify it by your local settings.- Migrate the data with
python manage.py migrate
. - Import the dummy data with
python manage.py import_data
. - Run the server with
python manage.py runserver
. - Open the browser at http://localhost:8000.
Client
- Run
ng test
to execute the unit tests via Karma. - Run
ng e2e
to execute the end-to-end tests via Protractor.
Server
- Run
pycodestyle --show-source --max-line-length=119 --exclude=server/whatsbuzz/migrations --show-pep8 server;
to check for PEP-8.
Client
Run npm run i18n
to create xlf
files.
Server
To make new strings for translation use the command
python manage.py makemessages -l he
python manage.py compilemessages -l he
Client
- Build the project
ng build --prod --aot
inside theclient
directory. - Run
firebase deploy
to deploy to deploy to Firebase.
Server
- Migrate the database
python manage.py migrate
. - Create the admin user
python manage.py createsuperuser
. - Gather all the static content locally into one folder
python manage.py collectstatic
. - Make sure
STATIC_URL
point to your CGP CloudStorage. - To make the bucket public
gsutil defacl set public-read gs://<your-gcs-bucket>
. - Upload the static content to CloudStorage
gsutil rsync -R static/ gs://<your-gcs-bucket>/static
. - Add your
SECRET_KEY
tosettings.py
. - Make sure your don't have
server/config/local_settings.py
file. - Deploy the app to CGP app engine
gcloud app deploy
.