Installation, Configuration and Updating

Note

The HOME PAGE of this project features a wizard, described later in this document.

Django-Music-Publisher (DMP) can be installed/deployed as a stand-alone application, or used as a Python package.

Standalone Deployment

Depending on your needs and technical knowledge, there are several options. They are listed below, starting with the simplest option, which can be performed without any technical skills in under 5 minutes.

Deployment to Heroku (free tier)

Heroku is a cloud platform that lets companies build, deliver, monitor and scale apps — we’re the fastest way to go from idea to URL, bypassing all those infrastructure headaches.

https://www.heroku.com/what

Django-Music-Publisher can simply be deployed to a Free dyno on Heroku with a free Dev database with up to 10.000 rows. Depending on complexity of your metadata, this is enough for up to 1.000 musical works.

Note

With Hobby Basic database ($9 per month), the database limit raises to 10.000.000 rows, which should be more than enough for any user od DMP. See Heroku prices for more information.

You will have to sign up with Heroku at https://signup.heroku.com/ and verify your e-mail, no payment information is required.

There are two ways to do it:

  • Guided deployment, which uses a wizard that helps you fill out the deployment form, and
  • Direct deployment, which does not, but takes you directly to the deployment form.

Guided Deployment to Heroku

The author and maintainer of Django-Music-Publisher provides a pre-installation wizard, which will guide you through the deployment process.

_images/pre_wizard.png

There is also a compatibility list for many collective management organizations. If your CMO or combination of CMOs is not supported, you can use the next method.

Direct Deployment

First, you need to sign up with Heroku and/or log in. Then click here. This will deploy the latest code in 21.5 Mayday branch.

_images/heroku.png

You will be taken directly to the deployment form. Please note that you must fill the form correctly, or Django-Music-Publisher will not be deployed. This is by design.

See Settings for more information.

Updating DMP on Heroku

There are three reasons for updating DMP:

  • if there is a security issue with the version you installed,
  • if there is a bug that affects you, or
  • if you need some features from the newer version.

While installation to Heroku is really simple, updating requires some technical knowledge. The simplest way to update is to install Heroku CLI (command line interface). It can be installed on Windows, Mac and Linux.

Then you log in, clone the repository, enter the folder, add a new remote and push:

$ heroku login
$ git clone https://github.com/matijakolaric-com/django-music-publisher.git
$ cd django-music-publisher/
django-music-publisher$ heroku git:remote --app yourapp
django-music-publisher$ git push heroku master

If you are upgrading from a version older than 20.7, you may need to delete an old buildpack, which can be found in Heroku dashboard in the Settings tab.

Other options - manual deployment (developers or system engineers)

Django-Music-Publisher is based on Django, which can be installed on Windows, Mac and Linux PCs and servers. For more information, consult the official Deploying Django documentation.

Installing as Python package (developers only)

If you plan to use Django-Music-Publisher as one of the apps in your Django project, there is nothing special about it:

pip install --upgrade django_music_publisher

Add music_publisher.apps.MusicPublisherConfig to INSTALLED_APPS. Almost everything goes through the Django Admin. The only exception is royalty calculation, which has to be added to urls.py

from music_publisher.royalty_calculation import RoyaltyCalculationView

urlpatterns = [
    ...
    path('royalty_calculation/', RoyaltyCalculationView.as_view(), name='royalty_calculation'),
]

There are several required settings.

Settings

Other settings

  • REQUIRE_SAAN - Makes Society-assigned agreement number field required for controlled writers
  • REQUIRE_PUBLISHER_FEE - Makes Publisher Fee field required for controlled writers
  • FORCE_CASE - available options are upper and title and smart, converting nearly all strings to UPPER CASE or Title Case or just UPPERCASE fields to Title Case, respectively.