Django Feature

The «django» feature adds the django framework to your project.

Usage

To use the Django Feature, make sure your Projectfile contains the following:

from medikit import require

django = require('django')

The django handle is a DjangoConfig instance, and can be used to customize the feature.

This will add a few items to your Makefile, and ensure a minimalistic django project structure is available.

By default, it will use Django ~=2.0,<2.1, but you can tune that:

django.version = '~=2.0.3'

This feature will also add or extend a “prod” python extra, that will install gunicorn.

Configuration

class medikit.feature.django.DjangoConfig[source]

Configuration class for the “django” feature.

static_dir

The django global static directory (property).

version = '~=2.0,<2.2'

Which django version requirement do you want?

Implementation

class medikit.feature.django.DjangoFeature(dispatcher)[source]
Config

alias of DjangoConfig

on_make_generate(event)[source]

Listens to medikit.feature.make.on_generate event (priority: -20)

on_python_generate(event)[source]

Listens to medikit.feature.python.on_generate event (priority: 0)

on_start(event)[source]

Listens to medikit.on_start event (priority: 0)

requires = {'python'}