- clean buttons code on account and checkout
- merge CheckoutRead and kpsul_checkout_data views (the first won)
APIModelObject interface
- add url_create, url_update, url_update_for
- rename url_object_for and url_object to url_read_for and url_read
kfet.statistic
- delete no longer used defs
- new mixin - ScaleMixin
- get scale args from GET params
- chunkify querysets according to a scale
Article stats
- use SingleResumeStat for manifest
- use ScaleMixin for sales
- update urls
- update permission required: teamkfet
Account stats
- update permission required: teamkfet
- operations use ScaleMixin
- fix manifests urls
K-Fêt - Statistics
New base class - StatScale
- create scale, given chunk size (timedelta), start and end times
- get labels of
- get start and end datetimes of chunks
DayStatScale: Scale whose chunks interval is 1 day
WeekStatScale: same with 1 week
MonthStatScale: same with 1 month
AccountStatOperationList: manifest of operations stats of an account
- renamed from AccountStatLastAll
- updated according to SingleResumeStat
AccountStatOperation:
- renamed from AccountStatLast
- remove scale logic with use of StatScale objects
- used scale is given by `scale` and `scale_args` GET params
- add filter on operations types with `types` GET param
AccountStatLast(Day,Week,Month) are deleted ("merged" in
AccountStatOperation)
New mixin: PkUrlMixin
- use with SingleObjectMixin standard django mixin (used by
DetailView...)
- `get_object` use field declared in `pk_url_kwarg` to get... the object
SingleResumeStat
- clean (part of) py code
AccountStatBalanceList
- renamed from `AccountStatBalanceAll`
- url modified
- add permission checking (only the connected user can get balance
stats manifest)
- clean py code
AccountStatBalance
- cleaner filtering management
- merge urls using this class
- clean py code
JavaScript
----------
- Basic classes that can be inherited to define a new class for a
django model in javascript.
- Formatters classes are used to render properties and attributes of
the instances of models classes.
- New classes to handle Account, Checkout, Statement models.
- Refactor K-Psul JS (part n/m).
- Better file organization.
Views
-----
- 'kpsul.checkout_data' is cleaner. Last statement is added to the JSON
response with GET paramater 'last_statement'.
- 'account.read.json' is merged in account.read. JSON response is sent if
GET parametter 'format' is set to 'json'.
- Fix PEP8 of concerned views.
New requirement: django-js-reverse
----------------------------------
Used to resolve the URLs defined in the project in JavaScript.
See https://github.com/ierror/django-js-reverse