Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gestioCOF
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 76
    • Issues 76
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Klub Dev ENSKlub Dev ENS
  • gestioCOF
  • Merge requests
  • !208

Stats K-Fêt - Python side

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Aurélien Delobelle requested to merge aureplop/fix_stats into master Apr 03, 2017
  • Overview 14
  • Commits 28
  • Pipelines 0
  • Changes 12

K-Fêt

  • fix graph size of stats
  • for real, users can only see/get their own account stats
  • article stats can only be accessed by teamkfet

K-Fêt - Stats

  • clean py code
  • 2 urls by kind of stats:
    • kfet.<...>.stat.<type>.list : manifest of proposed stats to user
    • kfet.<...>.stat.<type> : return stat datasets according to GET params (scale, begin, end, ...)

Scale

  • base class which implements logic for a scale
  • create a new scale, given params as begin, end, last...
  • iterate over it to get begin, end intervals (chunks)
  • give chunks labels

DayScale, WeekScale, MonthScale

  • use Scale
  • their chunks length is 1 day, 1 week, 1 month
  • take into account that a k-fet day begins at KFET_WAKES_UP_AT

K-Fêt - Misc

  • fix GET params in ajax call of statistic.js
  • delete unused template account_read_title.html
  • delete unused imports and defs in views.py
  • PkUrlMixin: use with SingleObject... class-based view, it gets object by filtering model objects on pk_url_kwarg
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: aureplop/fix_stats