djangoldp-energiepartagee


Namedjangoldp-energiepartagee JSON
Version 2.0.57 PyPI version JSON
download
home_pageNone
SummaryCustom DjangoLDP based package for Energie Partagee
upload_time2024-06-04 08:59:05
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # djangoldp_energiepartagee

## Installation

How to install the project locally

1- create virtual environement
`py -m venv venv`

2- activate venv
`venv\Scripts\activate.bat`

3- update pip & wheel
`py -m pip install -U pip wheel`

4- install sib-manager
`py -m pip install -U sib-manager`

5- launch the startproject command
`sib startproject energiepartagee_server`

6- install server
  => go into energiepartagee_server folder
`sib install server`

7- create superuser
`py manage.py createsuperuser`

8- add virtual link with the djangoldp_energiepartagee package :
`mklink /D [LINK] [TARGET]`
`mklink /D [...]\energiepartage_server\djangoldp_energiepartagee [...]\djangoldp_energiepartagee\djangoldp_energiepartagee`
=><!> [LINK] : Link to the "folder" where the target will be found

9- add the package in the package.yml file

10- run migration and migrate
`py manage.py makemigrations djangoldp_energiepartagee` (for the first time, then `py manage.py makemigrations` will be enough in case ogf modifications of the package)
`py manage.py migrate`

11- runserver
`py manage.py runserver`

## Custom Commands

With `djangoldp_energiepartagee` installed as an app, you will be able to run:

```sh
python manage.py create_annual_contributions
```

This command calculates the contribution for every actor in the database and creates a Contribution for each. The amount is calculated following an algorithm which can be found in the `Actor` model (`Actor.get_next_contribution_amount`). A contribution will not be added for any actors which have already paid a contribution in the same year. Use the `-F` option to override this, creating one contribution for every actor in the databae.

## Enable the context preprocessors

```yaml
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                ...
                'djangoldp_energiepartagee.context_processors.is_amorce',
            ],
        },
    },
]
```

Or, with SIB Platform:

```yaml
apps:
  hosts:
    xxx:
      services:
        context:
          processor: djangoldp_energiepartagee.context_processors.is_amorce
```

## Disable AMORCE Specific routines

In your `settings.yml`:

```yaml
server:
  IS_AMORCE: False
```



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "djangoldp-energiepartagee",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c6/4d/2420d265b96f0c1f126e2cb70a5ad9e625224c5dc432484fe22e0e9316e7/djangoldp_energiepartagee-2.0.57.tar.gz",
    "platform": null,
    "description": "# djangoldp_energiepartagee\n\n## Installation\n\nHow to install the project locally\n\n1- create virtual environement\n`py -m venv venv`\n\n2- activate venv\n`venv\\Scripts\\activate.bat`\n\n3- update pip & wheel\n`py -m pip install -U pip wheel`\n\n4- install sib-manager\n`py -m pip install -U sib-manager`\n\n5- launch the startproject command\n`sib startproject energiepartagee_server`\n\n6- install server\n  => go into energiepartagee_server folder\n`sib install server`\n\n7- create superuser\n`py manage.py createsuperuser`\n\n8- add virtual link with the djangoldp_energiepartagee package :\n`mklink /D [LINK] [TARGET]`\n`mklink /D [...]\\energiepartage_server\\djangoldp_energiepartagee [...]\\djangoldp_energiepartagee\\djangoldp_energiepartagee`\n=><!> [LINK] : Link to the \"folder\" where the target will be found\n\n9- add the package in the package.yml file\n\n10- run migration and migrate\n`py manage.py makemigrations djangoldp_energiepartagee` (for the first time, then `py manage.py makemigrations` will be enough in case ogf modifications of the package)\n`py manage.py migrate`\n\n11- runserver\n`py manage.py runserver`\n\n## Custom Commands\n\nWith `djangoldp_energiepartagee` installed as an app, you will be able to run:\n\n```sh\npython manage.py create_annual_contributions\n```\n\nThis command calculates the contribution for every actor in the database and creates a Contribution for each. The amount is calculated following an algorithm which can be found in the `Actor` model (`Actor.get_next_contribution_amount`). A contribution will not be added for any actors which have already paid a contribution in the same year. Use the `-F` option to override this, creating one contribution for every actor in the databae.\n\n## Enable the context preprocessors\n\n```yaml\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                ...\n                'djangoldp_energiepartagee.context_processors.is_amorce',\n            ],\n        },\n    },\n]\n```\n\nOr, with SIB Platform:\n\n```yaml\napps:\n  hosts:\n    xxx:\n      services:\n        context:\n          processor: djangoldp_energiepartagee.context_processors.is_amorce\n```\n\n## Disable AMORCE Specific routines\n\nIn your `settings.yml`:\n\n```yaml\nserver:\n  IS_AMORCE: False\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Custom DjangoLDP based package for Energie Partagee",
    "version": "2.0.57",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "32d80b7717a090994f413c1d53107af62b51c56c5cdf839e1ebce0a8707112ac",
                "md5": "ccb9316084330d02002c02f186b77c0f",
                "sha256": "2953a9fe5f716d931e67153af834dbc1ebceb1a1fd776845d1ee89199d267ca4"
            },
            "downloads": -1,
            "filename": "djangoldp_energiepartagee-2.0.57-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ccb9316084330d02002c02f186b77c0f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 658083,
            "upload_time": "2024-06-04T08:59:02",
            "upload_time_iso_8601": "2024-06-04T08:59:02.440528Z",
            "url": "https://files.pythonhosted.org/packages/32/d8/0b7717a090994f413c1d53107af62b51c56c5cdf839e1ebce0a8707112ac/djangoldp_energiepartagee-2.0.57-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c64d2420d265b96f0c1f126e2cb70a5ad9e625224c5dc432484fe22e0e9316e7",
                "md5": "1274f39badf2d45d28244852d80a19b8",
                "sha256": "a6a186f95d5133b781fb48838525dea36c3aab4a35194274d8c641bd8c5a8377"
            },
            "downloads": -1,
            "filename": "djangoldp_energiepartagee-2.0.57.tar.gz",
            "has_sig": false,
            "md5_digest": "1274f39badf2d45d28244852d80a19b8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 548613,
            "upload_time": "2024-06-04T08:59:05",
            "upload_time_iso_8601": "2024-06-04T08:59:05.920391Z",
            "url": "https://files.pythonhosted.org/packages/c6/4d/2420d265b96f0c1f126e2cb70a5ad9e625224c5dc432484fe22e0e9316e7/djangoldp_energiepartagee-2.0.57.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-04 08:59:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "djangoldp-energiepartagee"
}
        
Elapsed time: 0.26360s