Developer setup - JosephEoff/Mud-Py GitHub Wiki

This is a list of all the things it will take to get started with developing Mud-Py. It is mostly a list of references to various libraries or programs. You'll have to follow the instructions from the publishers to actually install referenced software - they have better documentation than I can cobble together.

If you are using Linux, then I recommend you install binary packages through the package manager of your distribution. Python libraries should be installed via pip.

These instructions are not for a production system. A production system should use a full scale database and it should be hosted in a real webserver. These instructions are for development use only.

I use Eric6 to work on Mud-Py. The Mud-Py repository includes the Eric6 project files. I recommend installing the "Project, Django" plugin from Detlev Offenbach (through the Eric6 "Plugin Repository.")

Required software:

  1. Python 3.6 or higher
  2. GDAL
  3. Spatialite
  4. Django
  5. SpatialLite Python module
  6. django-leaflet

Installation:

  1. Install Python 3.6 or higher.
  • Download the current version of Python for your operating system.
  • Follow the instructions from Python.org for your operating system to complete the installation.
  • Linux users can often install Python through the package manager. It is recommended to use the Python package from your Linux distribution rather than installing a package from Python.org
  1. Install GDAL
  • Download the latest stable release for your operating system.
  • Follow the instructions of the downloaded package for installation (including the necessary manual PATH settings under Windows.)
  • Alternatively, install through the package manager of your Linux distribution.
  1. Install SpatiaLite
  • Download the current binaries for your operating system.
  • I cannot find a good description of the installation.
  1. Install the required Python libraries The required packages can be installed with the Python "pip" package manager. Pip will install the Python libraries and any required binary packages for your operating system. Refer to the pip tutorial for guidance on using pip. I recommend installing the packages using an administrator account on your computer.

Ideally, once Python is installed, you simply open a terminal window (also called a "command box" under Windows) and type in the commands given below. If the pip commands don't work properly, refer to the tutorial to troubleshoot your setup.

pip install django

If the simple installation doesn't work, refer to the Django documentation.

pip install spatialite

pip install django-leaflet

There is documentation for the leaflet installation here.

Setup:

Once all the requirements are in place, clone the Mud-Py repository.

Open a command box and change into the Mud-Py/mud_py/ folder.

Execute the following commands: python manage.py migrate

python manage.py createsuperuser (Follow the onscreen prompts to create a superuser account in Mud-Py.)

python manage.py runserver

If everything worked properly, you should be able to open the Mud-Py page in your browser. (Click the Mud-Py link.)