djangoldp-energiepartagee


Namedjangoldp-energiepartagee JSON
Version 2.0.68 PyPI version JSON
download
home_pageNone
SummaryCustom DjangoLDP based package for Energie Partagee
upload_time2024-07-02 16:15:06
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/24/02/51e1a1934ed6f81df3b4503c0728c33ec193d578d4228df87b86cc80c574/djangoldp_energiepartagee-2.0.68.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.68",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87eef0fd57e4663c7e797f36011f3542697504bb372bbf7a08dd7f59c662bec0",
                "md5": "4df7827860f6b705ed71372d998e0c25",
                "sha256": "662d8a3d6404f01980c251ee3a7968b286cd71ae208dc9c23e2773bf8f6db69c"
            },
            "downloads": -1,
            "filename": "djangoldp_energiepartagee-2.0.68-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4df7827860f6b705ed71372d998e0c25",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 671373,
            "upload_time": "2024-07-02T16:15:01",
            "upload_time_iso_8601": "2024-07-02T16:15:01.213176Z",
            "url": "https://files.pythonhosted.org/packages/87/ee/f0fd57e4663c7e797f36011f3542697504bb372bbf7a08dd7f59c662bec0/djangoldp_energiepartagee-2.0.68-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "240251e1a1934ed6f81df3b4503c0728c33ec193d578d4228df87b86cc80c574",
                "md5": "ad784d385113916ce9219e68fc005344",
                "sha256": "326c9cd0e231f582993f0396e939668a655d0bebf2c88aab153f88e73c39cefd"
            },
            "downloads": -1,
            "filename": "djangoldp_energiepartagee-2.0.68.tar.gz",
            "has_sig": false,
            "md5_digest": "ad784d385113916ce9219e68fc005344",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 552423,
            "upload_time": "2024-07-02T16:15:06",
            "upload_time_iso_8601": "2024-07-02T16:15:06.030295Z",
            "url": "https://files.pythonhosted.org/packages/24/02/51e1a1934ed6f81df3b4503c0728c33ec193d578d4228df87b86cc80c574/djangoldp_energiepartagee-2.0.68.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-02 16:15:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "djangoldp-energiepartagee"
}
        
Elapsed time: 0.25475s