Developers Information

Sample configuration

The configuration will be taken from the default configuration file: ~/.config/swh/web/web.yml. The following introduces a default configuration file:

storage:
    cls: remote
    args:
        url: http://localhost:5002
debug: false
throttling:
    cache_uri: None
    scopes:
        swh_api:
            limiter_rate:
                default: 120/h
            exempted_networks:
                - 127.0.0.0/8

Run server

Either use the django manage script directly (useful in development mode as it offers various commands):

$ python3 -m swh.web.manage runserver

or use the following shortcut:

$ make run

Modules description

Common to all web applications

Configuration and settings

  • swh.web.config: holds the configuration for the web applications.

  • swh.web.doc_config: utility module used to extend the sphinx configuration when building the documentation.

  • swh.web.manage: Django management module for developers.

  • swh.web.urls: module that holds the whole URI scheme of all the web applications.

  • swh.web.settings.common: Common Django settings

  • swh.web.settings.development: Django settings for development

  • swh.web.settings.production: Django settings for production

  • swh.web.settings.tests: Django settings for tests

Common utilities

swh-web API application

swh-web browse application