Commit graph

14 commits

Author SHA1 Message Date
Martin Pépin 57411ab46f Remove __future__ imports 2018-01-06 16:10:13 +01:00
Martin Pépin 475f1adec5 Remove "coding: utf8" line 2018-01-06 16:10:13 +01:00
Aurélien Delobelle 9f307c1bd0 Fewer db requests on bda tirage.
bda.algorithm
- use iterator to find max_groups, instead of a db request

bda.views.do_tirage
- select_related() are now focused on some relationships (they were
  taking useless relationships)
- bda-revente filling takes 1 request (each save and add was issuing
  1 request)
2017-04-07 16:22:10 +02:00
Basile Clement 210c6d7712 Update Py3 compat 2016-07-15 00:20:08 +02:00
Basile Clement 21b8b6042f Compatibilité python 3
Rend GestioCOF compatible avec python 3. En particulier, il s'agit de :

  - Utiliser la version "fonction" de `print` dans `sync_clipper` et
    `tirage_bda`, avec le `from __future__ import print_function` pour
    garder la compatibilité avec python 2

  - Utiliser de l'unicode par défaut, même en python 2, avec
    `from __future__ import unicode_literals` et le décorateur de
    compatibilité `python_2_unicode_compatible` de Django pour les
    modèles, comme décrit à
    https://docs.djangoproject.com/en/1.9/topics/python3/#str-and-unicode-methods

  - Utiliser `six.text_type` à la place de `unicode`

Fixes #2.
2016-07-14 23:40:31 +02:00
Théophile Bastian 6d68f6638f PEP8: few more changes
Taken MR comments into account:
* `and` is considered a binary operator, thus put at the beginning of the line when splitting a line,
* same for `+`,
* same for `.` (different reasons).
2016-07-09 22:59:51 +01:00
Théophile Bastian 88bccc0e60 PEP8: Enforced other rules, including 80 cols 2016-07-09 21:39:11 +01:00
Théophile Bastian c7a3656ded PEP8: fixed ' = ' → '=' on parameters
'unexpected spaces around keyword / parameter equals'
2016-07-09 20:19:37 +01:00
Basile Clement 3229441cb7 Nettoyage de code
Essentiellement, suppression d'import inutilisés.
2016-06-10 23:59:41 +02:00
Martin Pépin 2331304992 Adopte le comportement de python3 pour la division
Les deux seuls fichiers touchés sont `bda/views.py` et
`bda/algorithm.py` d'après un
`grep -r '/' . | grep '\.py' | grep -v '^Binary' à la racine du projet.
2016-06-10 15:43:37 +02:00
Martin Pépin 7c3984c6fc Modification des vues 2016-06-01 16:09:09 +02:00
root 64b8ee4133 Grod commit dégueux avec une tonne de trucs. Berk. 2014-08-19 12:54:22 +02:00
root 9c989d886b Update while working on Django 1.5 upgrade 2013-09-05 22:20:52 +02:00
root 2479b0a24d Major update 2012-07-11 17:39:20 +02:00