FAQ - nollidnosnhoj/travel2change GitHub Wiki

Q: How to upgrade pip packages?

You may need to upgrade packages (like Django) in case of security fixes.

First, make sure you activate your virtual environment! Please refer to the Installation page.

python -m pip install --upgrade package-name

OR

python3 -m pip install --upgrade package-name (Use this if you're using Mac or Linux)

  • Replace package-name with the name of the package, like django

  • Doing this will attempt to upgrade the package.

After upgrading the package, make sure you update the requirements.txt file by:

pip freeze > requirements.txt Make sure you in the folder where the requirements.txt is located.

Afterwards, make sure you notify others.

I get the default Django CMS login

You must have established a new database (project.db). If you have not yet, create a superuser in the command line:

python manage.py createsuperuser

Aftewards, run the server and login. Once you are logged in, create a new page called Home. This is the home page and will use the home template.

Why the secrets.json file?

Eventually, we will start working with API keys that we want to keep secrets from the public. Also, the file will contain security keys that is very important to keep a secret. Of course, when we deploy the website, we will put these keys inside an environment variable. But for now, a secret json file will suffice.

Without the secrets.json file, you will not be able to run the server. Learn what to do with the secrets.json file here. (Step 9)