Extension of `python-gantt` with added functionality for django
Project description
python gantt lib
This project is an extension of the python-gantt module, providing some extra functionality.
This includes some translation to spanish of the days and months, new classes for add hyperlinks to the tasks and projects, and svg in format string for using it as context in Django lib.
Instalation
Run the following to install:
pip install gantt-lib-lautarodapin
Aditional requirements
- Library:
python-ganttsee link - Author: Alexandre Norman (norman at xael.org)
Usage
import gantt_lib
import datetime
resource = gantt_lib.Resource("Resource 1")
project = gantt_lib.HiperLinkedProject(
name='Project',
link='mypage/link/to/project',
target='_self' #HTML target (it opens the link on the same page)
)
project.add_task(gantt_lib.HyperLinkedTask(
name= 'task 1',
start=datetime.datetime.date(2020,7,1),
duration=5,
resources=[resource],
percent_done=0,
color="#03d529",
link_name='mypage/link/to/title',
link_resource='mypage/link/to/resource',
link_lateral='mypage/link/to/extra',
target='_self' #HTML target (it opens the link on the same page)
)
)
# make_svg_for_task returns the xml code in string format, this way you can use it as context in django or flask
# also saves it into a file
svg = project.make_svg_for_tasks(
'file.svg',
today=datetime.date(2020,7,15),
start=datetime.date(2020,7,1),
end=datetime.date(2020,7,20)
)
# Or you can get only the svg (str) code
svg = project.get_string_svg_for_tasks(
today=datetime.date(2020,7,15),
start=datetime.date(2020,7,1),
end=datetime.date(2020,7,20)
)
- Result: SVG
Author
Lautaro Dapino
Version 0.0.5
- Added
targetfor the links. - Added new method for rendering the
svgintostrformat.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gantt-lib-lautarodapin-0.0.5.tar.gz.
File metadata
- Download URL: gantt-lib-lautarodapin-0.0.5.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6714b4335fe0e9aca616f55310d6035782f4ad780fe3fcb8e7c95094ceca2783
|
|
| MD5 |
9e51c38285235bee9f59db0ee7de5700
|
|
| BLAKE2b-256 |
22fe496c11b54e4c3d4d74362661e1cfaddfbe5e947c863bc209c8ca76bfdcb5
|
File details
Details for the file gantt_lib_lautarodapin-0.0.5-py3-none-any.whl.
File metadata
- Download URL: gantt_lib_lautarodapin-0.0.5-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c780993c1b8a3c2b3efe85810c67d66fc14078d62fd1ef766ab2df9982de9b1
|
|
| MD5 |
d5887fef691ba87a6af6d3692b5c744f
|
|
| BLAKE2b-256 |
e92f9fe039c07fdf39ad70896f079d750bb896501ed34f8277c3d4179b3fc643
|