diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-06-24 14:18:32 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-07-29 08:49:03 +0200 |
commit | 63a6b5021626e956e6151ba3cc1e358aabf29e8a (patch) | |
tree | 7d57dcac6d2fa675c1981443b6a81cddb686313b /ishtar_common/models_imports.py | |
parent | 283c594606b5c69ef2cc750f4eabdafcc904f0b4 (diff) | |
download | Ishtar-63a6b5021626e956e6151ba3cc1e358aabf29e8a.tar.bz2 Ishtar-63a6b5021626e956e6151ba3cc1e358aabf29e8a.zip |
First steps in the creation of new export format and new version of the .gpkg creator
Diffstat (limited to 'ishtar_common/models_imports.py')
-rw-r--r-- | ishtar_common/models_imports.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py index 38ac41d38..6a9b8b145 100644 --- a/ishtar_common/models_imports.py +++ b/ishtar_common/models_imports.py @@ -56,6 +56,8 @@ from django.utils import timezone from django.utils.functional import cached_property from django.utils.translation import gettext_lazy as _, pgettext_lazy +#from ishtar_common.models import EXPORT_FORMATS + UnoCalc = None ITALIC = None if settings.USE_LIBREOFFICE: @@ -153,6 +155,9 @@ IMPORT_TYPES = ( ) IMPORT_TYPES_DICT = dict(IMPORT_TYPES) +# Try to imitate the EXPORT_FORMAT of models.py +EXPORT_FORMATS = [("gpkg", _("QFIELD")),] +EXPORT_FORMATS_DICT = dict(EXPORT_FORMATS) SPECIFIC_TYPES_COLUMNS = { "point_2d": "Point2D", @@ -179,6 +184,8 @@ class ImporterType(models.Model): type = models.CharField( _("Type"), max_length=3, choices=IMPORT_TYPES, default="tab" ) + # Addition of the export_format + export_format = models.CharField(_("Export format"), max_length=4, choices=EXPORT_FORMATS, blank=True, default="") available = models.BooleanField(_("Available"), default=True) users = models.ManyToManyField("IshtarUser", verbose_name=_("Users"), blank=True) associated_models = models.ForeignKey( |