diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2013-04-16 16:52:00 +0000 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2013-04-16 16:52:00 +0000 |
| commit | d715b71f39fae579b79f9ce4fd3f9fb2a828311b (patch) | |
| tree | e851a91f6f514abcfd20b7d5e8ebabe30e2e2b2e /archaeological_operations | |
| parent | 5a8f66d8349b00812a4a8b55317688a7832a10a3 (diff) | |
| parent | 83cb933dcd05bd6308b68fa1559d828f5b1a18bc (diff) | |
| download | Ishtar-d715b71f39fae579b79f9ce4fd3f9fb2a828311b.tar.bz2 Ishtar-d715b71f39fae579b79f9ce4fd3f9fb2a828311b.zip | |
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
Diffstat (limited to 'archaeological_operations')
| -rw-r--r-- | archaeological_operations/admin.py | 13 | ||||
| -rw-r--r-- | archaeological_operations/import_from_dbf.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/locale/fr/LC_MESSAGES/django.po | 4 | ||||
| -rwxr-xr-x | archaeological_operations/management/commands/import_operations.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/models.py | 1 |
5 files changed, 12 insertions, 10 deletions
diff --git a/archaeological_operations/admin.py b/archaeological_operations/admin.py index de8b47edc..01b125e60 100644 --- a/archaeological_operations/admin.py +++ b/archaeological_operations/admin.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2012 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,7 +20,7 @@ from django.conf import settings from django.contrib import admin -from ishtar_common.admin import HistorizedObjectAdmin +from ishtar_common.admin import HistorizedObjectAdmin, GeneralTypeAdmin import models @@ -33,7 +33,7 @@ class AdministrativeActAdmin(HistorizedObjectAdmin): admin.site.register(models.AdministrativeAct, AdministrativeActAdmin) class PeriodAdmin(admin.ModelAdmin): - list_display = ('label', 'start_date', 'end_date', 'parent') + list_display = ('label', 'start_date', 'end_date', 'parent', 'available') model = models.Period admin.site.register(models.Period, PeriodAdmin) @@ -66,7 +66,10 @@ class ParcelAdmin(HistorizedObjectAdmin): admin.site.register(models.Parcel, ParcelAdmin) -basic_models = [models.OperationType, models.RemainType, models.ActType, - models.ParcelOwner] +general_models = [models.OperationType, models.RemainType, models.ActType] +for model in general_models: + admin.site.register(model, GeneralTypeAdmin) + +basic_models = [models.ParcelOwner] for model in basic_models: admin.site.register(model) diff --git a/archaeological_operations/import_from_dbf.py b/archaeological_operations/import_from_dbf.py index d0f55cdbe..843e5151c 100644 --- a/archaeological_operations/import_from_dbf.py +++ b/archaeological_operations/import_from_dbf.py @@ -247,8 +247,6 @@ def import_operations_dbf(values, col_defs=DBF_OPE_COLS, update=False, for line_idx, vals in enumerate(values): if stdout: stdout.write("\r* line %d" % (line_idx)) - if not line_idx: - continue # remove header args = {} for col_idx, val in enumerate(vals): if len(col_defs) <= col_idx or not col_defs[col_idx]: diff --git a/archaeological_operations/locale/fr/LC_MESSAGES/django.po b/archaeological_operations/locale/fr/LC_MESSAGES/django.po index 0841a6c89..4d16482b7 100644 --- a/archaeological_operations/locale/fr/LC_MESSAGES/django.po +++ b/archaeological_operations/locale/fr/LC_MESSAGES/django.po @@ -97,7 +97,7 @@ msgstr "Date de fin de chantier" #: forms.py:176 templates/ishtar/dashboards/dashboard_operation.html:315 msgid "Total surface (m²)" -msgstr "Surface totale (m²)" +msgstr "Surface totale des terrains (m²)" #: forms.py:183 models.py:78 models.py:157 msgid "Operation code" @@ -206,7 +206,7 @@ msgstr "Il y a des périodes identiques." #: forms.py:341 msgid "Would you like to close this operation?" -msgstr "Voulez vous clôturer cette opération ?" +msgstr "Voulez vous clore cette opération ?" #: forms.py:345 msgid "Would you like to delete this operation?" diff --git a/archaeological_operations/management/commands/import_operations.py b/archaeological_operations/management/commands/import_operations.py index cdcbff54b..3cf4a569d 100755 --- a/archaeological_operations/management/commands/import_operations.py +++ b/archaeological_operations/management/commands/import_operations.py @@ -33,7 +33,7 @@ class Command(BaseCommand): def handle(self, *args, **options): if not args or not args[0]: - raise CommandError("No file provided." % args[0]) + raise CommandError("No file provided.") filename = args[0] update = len(args) > 1 and args[1] file_type = len(args) > 1 and args[2] diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 02ec1a912..d7dc18b3c 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -38,6 +38,7 @@ class OperationType(GeneralType): class Meta: verbose_name = _(u"Operation type") verbose_name_plural = _(u"Operation types") + ordering = ['label'] @classmethod def is_preventive(cls, ope_type_id, key=''): |
