Arpegio can be installed using pip:

pip install [--user] arpegio


Arpegio works with the following packages:

This packages are installed when using pip.


All the applications provided with Arpegio are optional. The only exception is core. To install the applications just add them to the INSTALLED_APPS section of your project’s settings.


Context processors

Add the settings template context processor. This context processor passes information about the settings of the project to the templates. The settings defined with Arpegio are usefull for extending and customizing themes.

      'BACKEND': 'django.template.backends.django.DjangoTemplates',
      'DIRS': [],
      'APP_DIRS': True,
      'OPTIONS': {
            'context_processors': [


The urlpatterns defined in Arpegio for testing purposes are the following:

urlpatterns = [
   url(r'^blog/', include('')),
   url(r'^pages/', include('arpegio.pages.urls')),
   url(r'^category/', include('arpegio.categories.urls')),
   url(r'^tags/', include('arpegio.tags.urls')),

The above urlpatterns are not defined in Arpegio because all the apps are optional. You can copy and paste the above code or prefix the urls used in your project individually.


When using Django 1.8 you need to define the app name and namespace of the urls with include('', namespace='app', app_name='app').

For example, to include the blog app you need to include it with include('', namespace='blog', app_name='blog').

If you don’t set a namespace the url resolution methods will break.

Syncing the database

Arpegio is in alpha state and doesn’t include migrations. To sync the database you will need to run:

python makemigrations
python migrate

The migrations are going to be provided when reaching the beta state.

Arpegio’s settings

Arpegio uses a custom system to manage settings. To use it you have to include the following dictionary in your settings file:

   'CATEGORY': {
      'Variable': {
         'value': 'Some value'

The settings are passed to templates using the context variable arpegio and can be used like {{ arpegio.category.variable.value }}. Note that the keys are lowercased when they are processed.

This dictionary structure allows passing custom settings to the templates in a flexible way. You can easily include metada with the variables and pass information like this:

   'GENERAL': {
      'Site_name': {
         'value': 'My site'}
      'Github': {
         'value': '',
         'css-class': 'github-link'
      'Twitter': {
         'value': ''
         'css-class': 'twitter-link',
      'Facebook': {
         'value': ''
         'css-class': 'facebook-link',

The settings can also be defined in reusable apps. Just add a file in your app’s folder and include the following code:

from arpegio.core.settings import site

settings = {'GENERAL': {'SITE_NAME':{'VALUE': 'App defined'}}}


Project settings take precedence over App settings. Using this workflow you can make reusable apps and override specific settings in your configuration file without touching the templates. This makes template inheritance even easier to work with and the site’s configurations are keept in a central file that can be versioned and/or forked.