Simplify excel reports from django apps
Project description
Quick guide:
Here is defined models for example:
from django.db import models
class M2MRelated(models.Model):
field = models.TextField()
class RelatedModel:
field = models.TextField()
class MyModel:
field = models.TextField()
related_model = models.ForeignKey(RelatedModel, models.DO_NOTHING)
m2m_related = models.ManyToManyField(M2MRelated)
How to use BaseReport class:
from django_excel_report import BaseReport
class MyReport(BaseReport):
model = MyModel
fields = ["field", "related_model__field", "m2m_related__field"]
def some_task(**kwargs):
qs = MyModel.objects.filter(**kwargs)
report = MyReport(queryset=qs)
report.generate()
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
Close
Hashes for django_excel_report-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a37b9e862816eec724ad08b0eb3dd4de9b53e95a4c2f80f6fd69cdc8d4e8c211 |
|
MD5 | 2eb5d06bcac1a3902277f1e3cea9adb7 |
|
BLAKE2b-256 | 9e11c21fc2647008542b1d752504ebb6148f9767f5084fa4d07c5f2b0f490ae8 |
Close
Hashes for django_excel_report-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2ec52e5c3b79e9f9477f34c462beccd1bb8a409689326bea99a8c09400b7bc3 |
|
MD5 | be98548b9dbb59198bc3d57b2b355e0d |
|
BLAKE2b-256 | 36f381bd806e2f9110a892f9db8abb7c83c2b2011d165648f5eceb6b7dc7c4ee |