Commit graph

1740 commits

Author SHA1 Message Date
Aurélien Delobelle
a6f52cfdc5 cof -- Fix urls naming in event template 2018-01-19 18:38:34 +01:00
Aurélien Delobelle
f5b280896f cof -- Add tests for event views 2018-01-19 18:36:03 +01:00
Aurélien Delobelle
ce73499077 Fix use of Widget.build_attrs in TriStateCheckbox
Signature changed in Django 1.11.
2018-01-19 18:15:57 +01:00
Aurélien Delobelle
8675948d9e cof -- Fix urls naming in survey templates 2018-01-19 18:01:36 +01:00
Aurélien Delobelle
57de31d59a cof -- Add tests for survey views 2018-01-19 17:57:43 +01:00
Aurélien Delobelle
776ff28141 cof -- Add helpers to test cof views. 2018-01-19 17:52:08 +01:00
Aurélien Delobelle
42e762bc4a Py3 allows to shorten super() 2018-01-16 16:50:27 +01:00
Aurélien Delobelle
478f56d94b kfet -- Create initial statement on checkout save
- Why? Because it should be the actual behavior.
- To allow using arithmetic operations with values of DecimalField when
object are not retrieved from DB, some strings are replaced by Decimal
or int.
If you wonder why it's not automatically done, see:
https://code.djangoproject.com/ticket/27825
2018-01-16 16:49:02 +01:00
Aurélien Delobelle
525bb4d16d kfet -- Fix available checkouts in K-Psul
The checkout validity is checked using the current datetime (when
requesting the kpsul page).
2018-01-15 17:03:57 +01:00
Aurélien Delobelle
e23e1bdba6 kfet -- Add test to check the choices of checkouts in K-Psul
Particularly, it adds a regression test for #184.
2018-01-15 17:01:06 +01:00
Aurélien Delobelle
6059ca067b Speed up tests
~20% less using MD5 and force_login in kfet testcase.
~77% less by disabling the debug tollbar.
2018-01-15 05:41:51 +01:00
Martin Pépin
79fccc136a Merge branch 'master' into Kerl/tests 2018-01-10 20:21:38 +01:00
Ludovic Stephan
52fd49616d Fix model test 2018-01-10 20:14:27 +01:00
Martin Pépin
5a5b60ec4d Merge branch 'master' into Kerl/drop_py2_compat 2018-01-10 20:12:59 +01:00
Ludovic Stephan
501d592d2f Merge branch 'master' into Aufinal/bda_fixes 2018-01-10 20:00:34 +01:00
Martin Pépin
91119f68bc Ne pas oublier avant de passer en prod… 2018-01-10 17:34:41 +01:00
Aurélien Delobelle
44eee9be38 Merge branch 'aureplop/py34-compat' into 'master'
py34 compat

See merge request !279
2018-01-10 17:30:44 +01:00
Aurélien Delobelle
f58f120e7a py34 compat
(already present in prod)
2018-01-10 17:25:07 +01:00
Martin Pepin
771b642a98 Merge branch 'aureplop/revente-reply_to' into 'master'
bda -- Set winner's email as Reply-to of the email…

Closes #179

See merge request !276
2018-01-07 16:03:20 +01:00
Martin Pépin
5086128f16 Fix ill-formed url in tests 2018-01-07 14:45:04 +01:00
Martin Pépin
c80e63415b Load custommails before bda tests 2018-01-07 14:30:33 +01:00
Martin Pépin
e9b901337e A few tests for BdA views 2018-01-07 13:35:23 +01:00
Martin Pepin
433b3f4716 Merge branch 'aureplop/1.11' into 'master'
Upgrade to Django 1.11

See merge request !275
2018-01-06 17:00:28 +01:00
Martin Pépin
62d8c2ffaf remove @py2_unicode_compat + six 2018-01-06 16:10:13 +01:00
Martin Pépin
97eed06b6f Remove builtins imports 2018-01-06 16:10:13 +01:00
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
Ludovic Stephan
9a8773978c Use new method in admin 2017-12-19 12:50:20 +01:00
Ludovic Stephan
1783196a9c Management view only deals with Revente objects
Except for Revente creation, every form is now handled with revente
objects, to use the display option in the previous commit.
2017-12-19 12:41:50 +01:00
Ludovic Stephan
f1bbade002 Better labels for revente objects
The label for the ReventeModelMultipleChoiceField now depends on a
`own` parameter, which determines if we display the seller or the
buyer's name.
2017-12-19 12:40:50 +01:00
Ludovic Stephan
dfa8c1a1a1 Merge branch 'Aufinal/bda_fixes' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/bda_fixes 2017-12-19 11:54:07 +01:00
Ludovic Stephan
5f9f222cda Merge branch 'Kerl/bda_fixes' into 'Aufinal/bda_fixes'
Kerl/bda fixes

See merge request !273
2017-12-19 11:53:31 +01:00
Ludovic Stephan
212528011a Add some tests 2017-12-19 11:40:02 +01:00
Aurélien Delobelle
32720c56a6 kfet -- Tables are sortable
Many tables in kfet app templates become sortable:
account list, negative account list, article list, article inventory
list, article supplier list, article category list, checkout list,
checkout statement list, inventory list, inventory details, order list,
order creation, order details.

This is achieved thanks to the jQuery plugin 'tablesorter':
https://mottie.github.io/tablesorter/docs/

- Affected tables also got sticky headers (it stays visible on scroll).
- Dates format are modified in order to ease the date sorting with the
plugin (it avoids writing a custom parser, or an extractor from
additional hidden element in the table cells).
- Tables whose content is classified by category (of articles) now uses
several tbodies. This has minor effects on the tables style.
- Tags of the header help signs become 'i', instead of 'span', in order
to avoid weird spacing.
2017-11-27 18:24:22 +01:00
Aurélien Delobelle
241c77e3b4 bda -- Set winner's email as Reply-to of the email…
…sent to the seller when a resale has been assigned.

Fixes #179.
2017-11-24 06:58:33 +01:00
Aurélien Delobelle
b0b0542407 Upgrade to Django 1.11
- Deprecation warnings using Django 1.8 are resolved.
- Deprecation warnings using Django 1.11 are resolved.

- Admin: grappelli is no longer used.
- Upgrade to django-autocomplete-light v3 (v2 is not 1.11 compatible).
  * autocomplete.modelform_factory being dropped, code uses dal Select2
    views and widgets.
2017-11-19 18:41:39 +01:00
Aurélien Delobelle
36ce038050 Merge branch 'Qwann/legibility_kfet' into 'master'
Qwann/legibility kfet

See merge request !272
2017-11-10 14:54:17 +01:00
Martin Pépin
91bdf11852 Coding style: python's scope sucks 2017-11-01 17:29:38 +01:00
Martin Pépin
f18959c0a1 BdA-Revente: meaningful names, some help tests 2017-11-01 17:26:40 +01:00
Martin Pépin
e1794a654f Merge branch 'master' into Aufinal/bda_fixes 2017-11-01 11:25:52 +01:00
Martin Pépin
273e6374ef Pluralization in bda -> participant list 2017-11-01 11:09:35 +01:00
Qwann
93fa79128c order table striped 2017-10-31 15:10:21 +01:00
Martin Pepin
19e6ddc8bf Merge branch 'aureplop/delete-kfet-globalperms' into 'master'
Delete GlobalPermissions model (migrations)

See merge request !270
2017-10-27 10:04:17 +02:00
Aurélien Delobelle
895f7e062c Delete GlobalPermissions model (migrations)
It is an old model which doesn't exist anymore in kfet.models module.

This adds its missing DeleteModel in migrations.
2017-10-27 03:38:28 +02:00
Martin Pépin
1c90d067fa Make cof.settings a module 2017-10-26 18:13:09 +02:00
Ludovic Stephan
785555c05c Misc fixes 2017-10-26 12:40:11 +02:00
Aurélien Delobelle
364648fb4f Merge branch 'Kerl/cours' into 'master'
initialisation des compteurs d'attributions de petits cours et settings.EMAIL_HOST

Ce patch règle deux problèmes en prod + un bug seulement présent en dev :

- Mauvaise initialisation des compteurs d'attributions de petits cours lors de la création d'un matière (premier compteur lié à cette matière)
- absence de `EMAIL_HOST` dans les settings => problèmes en production : la valeur par défaut `localhost` n'est pas satisfaisante.
- Il manquait un `Type` de variable dans la fixture des mails auto (dev seulement, visiblement pas de souci en production).

See merge request !265
2017-10-26 01:57:01 +02:00
Martin Pépin
1a136088bf Add missing type in custommail (dev only) 2017-10-25 22:08:29 +02:00
Martin Pépin
40abe27e81 EMAIL_HOST needs to be set but as a secret 2017-10-25 22:05:14 +02:00
Martin Pépin
a07b5308a3 PetitCoursAttributionCounter defaults to 0 2017-10-25 22:01:58 +02:00