djangocms-repo-stats documentation¶
djangocms-repo-stats provides a plugin for django-cms to provide stats about github repositories.
CMS Plugins¶
GithubRepoStatsPlugin
¶
This is the primary plugin for getting statistics from github.
name¶
The plugin takes a name
value which is the username & repo name from github.
For example, the URL for this application is https://github.com/marksweb/djangocms-repo-stats so the plugin
name
would be marksweb/djangocms-repo-stats
.
data¶
The data received from github is saved to a JSONField
during a pre_save
signal handler.
Settings¶
You must set REPO_STATS_GITHUB_TOKEN
in your project settings to your github access token so that you can get statistics.
The default settings are;
REPO_STATS_COMMIT_DAYS = -30
REPO_STATS_CLOSED_DAYS = -30
Commits¶
The stats include the number of commits since a given day, where the default for REPO_STATS_COMMIT_DAYS
is 30 days ago.
Closed issues¶
The stats include the number of closed issues since a given day, where the default for REPO_STATS_CLOSED_DAYS
is 30 days ago.
Signals¶
The djangocms_repo_stats.signals
module defines a set of signals sent by
Django CMS Repo Stats.
pre_delete¶
Clear cache.
pre_save¶
Clear cache & collect data from github, saving it to the instance data
field.