Warning
DO NOT use this method for ANY UAT/DEV/PROD environments that are NOT on your local. The settings.py file contains a secret_key that is published.
Warning
DO NOT edit the settings.py file - as changes can be pushed to a public github.
Attention!
If you would like any help setting up these environments, why not join our discord - https://discord.gg/64uhRztS6n
NearBeach currently supports the following Django versions;
- Django Version 3.2+
More information about upgrading Django can be found found in the Django Documentation
Attention!
We are assuming you have pip3 installed on your local system. If not, please follow these instructions: https://github.com/pypa/get-pip
Attention!
We are assuming you have installed Python 3.7+ on your local development system. If not, please follow these instructions: https://www.python.org/downloads/
- In a terminal, navigate to your project development folder
cd /<<project-dev-folder>>
- Use Git to download NearBeach source code
git clone https://github.com/robotichead/NearBeach cd ./NearBeach
- Once pip is upgraded, you will need to create a virtual environment
sudo pip3 install virtualenv
- Create your own virtual environment for python
virtualenv <<project_environment>>
This will create a directory called "<<project_environment>>", this will store NearBeach's libraries for python
- Activate the virtual environment using the following command
source ./<<project_environment>>/bin/activateYou terminal prompt will change to indicate that it is working in the virtual environment now. It should look like the following
(<<project_environment>>)user@computer:
- Install All requirements
pip install requirements-dev.txt
- Create the database
python3 manage.py migrate
- Create a superuser, by running the following command and filling out the fields appropriately
python3 manage.py createsuperuser
- Run the webserver
python3 manage.py runserver
- To access NearBeach, open up your browser and go to http://localhost:8000 or alternatively http://127.0.0.1:8000.
- To install all NPM packages, please run the following code
npm install
- Once npm has finished installing, you can compile the code using the following;
npm run prod
- Alternatively, you can run a watch
npm run watch