Updating or Patching NearBeach

NearBeach and it’s framework Django will need frequent updating/patching. (talk about security)

Updating Django (Web Framework)

It is recommended to install NearBeach on a Long Term Support (LTS) version of Django. Security fixes/patches are applied for a longer period of time, helping keep your server secure.

NearBeach currently supports the following Django versions;

  • Django Version 3.1+

More information about upgrading Django can be found found in the Django Documentation

Updating NearBeach

NearBeach will be using the Semantic Versioning system. Version numbers will be laid out as follows; major.minor.patch

  1. MAJOR version changes means a new NearBeach. The changes are extensive that a new number for NearBeach is required.
  2. MINOR version changes means new functionality in NearBeach. This could require
    • Database migrations
    • Static file migrations
  3. PATCH versions mean very small changes. Usually this is to fix a bug or include a static file that was missing.


  1. Use ssh to connect with your web server
ssh <<webserver IP or address>>
  1. Use cd to navigate to your project directory
cd <<project location>>
  1. Activate your virtual environment for your web server
source <<virtualenv_location>>/bin/activate
  1. Update NearBeach using PIP
pip install --upgrade NearBeach

If you require a certain version of NearBeach, use the following code as an example

pip install NearBeach==0.26.0
  1. Once NearBeach has been updated, you will still need to;
    • Apply any database Migrations
    • Collect any static files
  2. Use the following code to apply any migrations
python3 ./manage.py migrate
  1. Use the following code to collect any static files
python3 ./manage.py collectstatic
  1. Refresh gunicorn to enforce the new version
sudo service gunicorn refresh

Your new version of NearBeach should be ready.

Caching Issues

NearBeach does not use a mixer to notify the browser or the cache that the static files (JavaScript, CSS, and Images) have been updated. This can cause issues when applying a patch for users. We recommend people clean their cache to stop any issues.


Please note - if you are using services like CloudFlare - it might cache an old version of the static files. You will need to purge the cache on these services.