Compare commits

...

82 Commits

Author SHA1 Message Date
Trullemans Gregory e61279b75b Migration to new device (part 2) 2022-01-14 11:54:10 +01:00
Trullemans Gregory 796ccc3f09 Migration to new device (part 2) 2022-01-14 11:42:39 +01:00
Trullemans Gregory c38c72d637 Migration to new device 2022-01-14 10:58:58 +01:00
Trullemans Gregory 16486064ce Minor improvement 2021-12-05 12:43:30 +01:00
Trullemans Gregory 0cb1a81215 Dump database 2021-10-29 09:24:41 +02:00
Trullemans Gregory 3b1862f9f6 Renaming ageBoy/ageGirl to age_boy/age_girl 2021-10-26 19:08:23 +02:00
Fred Pauchet 8b9e61ed2d Begin moving templates to their own subdirectory 2021-10-20 21:50:47 +02:00
Fred Pauchet 359c215924 Add a 'cancel' button on the places form 2021-10-20 21:47:24 +02:00
Fred Pauchet 76eb02585b Fix spelling (again) 2021-10-20 21:42:09 +02:00
Fred Pauchet 4d095fab31 Fixing spelling 2021-10-20 21:34:57 +02:00
Fred Pauchet 9381ebc593 Allow to set related user from the admin 2021-10-20 21:18:17 +02:00
Fred Pauchet f409ce4cc5 Fixing small bugs that prevent using the application
* Profiles do not exist when accessing settings
* Impossibility to change the sidebar color
* `verbose_name` on EventParticipation
* Fix CourseAdmin
* Fix PlanningLineAdmin
2021-10-19 20:56:38 +02:00
Fred Pauchet f057380fdb Enable whitenoise to serve static files 2021-10-14 21:51:50 +02:00
Fred Pauchet 3d919c7edf Clean up settings.py (a little bit) 2021-10-14 21:46:45 +02:00
Fred Pauchet fe4d2c620e Add psycopg2 as production requirement 2021-10-08 22:10:25 +02:00
Fred Pauchet 046755d987 Make it work on Heroku
Add gunicorn as requirements
Change khana.settings to config.settings
2021-10-08 22:04:44 +02:00
Fred Pauchet 54695787de Add requirements.txt to make buildpack compatible 2021-10-08 21:51:09 +02:00
Fred Pauchet 7bba598ab0 Building for heroku 2021-10-08 21:49:47 +02:00
Fred Pauchet ee2608d820 Add a Procfile for heroku to run correctly 2021-10-08 19:58:39 +02:00
Fred Pauchet dcb5cd0e9d Fix renamed fields (but not everywhere) 2021-10-05 21:28:23 +02:00
Fred Pauchet b700ca8b10 Except bare exception (instead of expression) 2021-10-05 21:16:51 +02:00
Fred Pauchet f278d4befa manage.py runserver and manage.py check say it's OK 2021-10-05 19:31:33 +02:00
Fred Pauchet 91ee5cdc65 pylint khana --errors-only says it's OK 2021-10-05 19:25:57 +02:00
Fred Pauchet 8e9b4b8aa7 Rewrite templatetags 2021-10-04 21:46:09 +02:00
Fred Pauchet e56660e626 Here we go again... 2021-10-04 21:39:37 +02:00
Fred fa6c6d531a 100% test coverage on location/models.py 2021-06-22 19:13:34 +02:00
Trullemans Gregory 059b3c32bf [WIP] Multiples modifications dans l'app People 2021-06-22 08:08:32 +02:00
Trullemans Gregory f089b06f54 [WIP] [Objective] Nomenclature des champs, classes et attributs #43 2021-06-20 18:19:33 +02:00
Trullemans Gregory 088895ec43 Close #45 2021-06-20 14:34:56 +02:00
Trullemans Gregory 787ba706aa Merge branch 'master' of grimbox.be:Sulley/khana 2021-06-20 14:30:03 +02:00
Trullemans Gregory 0b8fd72e9d Close#64 : suppression des dossiers et 2021-06-20 14:28:26 +02:00
Fred 3376abd5b2 Merge pull request 'Propositions liées à la qualité du code (pep8, pylint, ...)' (#58) from propal/pep8-pylint into master
Reviewed-on: #58
2021-06-19 08:29:35 +02:00
Fred e944ecdb34 Merge branch 'master' into propal/pep8-pylint 2021-06-19 08:28:03 +02:00
Fred 9780834fc6 Merge pull request 'bugfix/67-reverse-for-profile-update' (#69) from bugfix/67-reverse-for-profile-update into master
Reviewed-on: #69
2021-06-19 08:27:20 +02:00
Fred 801477eadd Revert to master base.html 2021-06-16 19:37:34 +02:00
Fred 875190be76 Revert base.html to master
Fix parameters when updating profile
2021-06-16 19:32:40 +02:00
Fred 6f81a0d595 Fix bug #67
+ Simplification de l'URL
+ Simplification de la vue

Fix #67
2021-06-16 19:27:20 +02:00
Fred fe964af90a Merge pull request 'Quelques idées' (#62) from propal/planning into master
Reviewed-on: #62
2021-05-19 14:33:24 +02:00
Sulley bb09f6f28c Merge branch 'master' into propal/pep8-pylint 2021-05-17 10:43:22 +02:00
Fred Pauchet e6207d9a7a Quelques idées 2021-05-16 21:02:08 +02:00
Trullemans Gregory f2be9fb312 Add information file 2021-05-16 19:03:44 +02:00
Trullemans Gregory 341bf23d1c Close #60 and minor comments improvement 2021-05-15 17:01:05 +02:00
Trullemans Gregory c9798ffd31 Close #59 and multiple improvement/bug fix for Gymnast <-> Django.User 2021-05-15 16:51:40 +02:00
Fred Pauchet c390f06801 Move .pylintrc at the root directory
This allows an easier integration with the editor
and pylint can still be run with pylint src/*
2021-05-15 15:07:55 +02:00
Trullemans Gregory 59cf3a90f7 [WIP] Gymnast <-> Django.User | Nw DB Backup. 2021-05-15 10:22:32 +02:00
Trullemans Gregory 9ba2a39c82 [WIP] Gymnast <-> Django.User 2021-05-15 10:02:31 +02:00
Fred Pauchet 10ac31b088 Review Communication app with pylint
See also #59
2021-05-14 21:39:43 +02:00
Fred Pauchet b9466342ad Pylint configuration for 10 out of 10 :-) 2021-05-14 21:23:11 +02:00
Fred Pauchet 6a7636682d Add pylint as requirement 2021-05-14 20:45:37 +02:00
Fred Pauchet 1d182cf5e7 Add setup.cfg to limit max line length to 100
... and complexity at 10.
but this won't be needed, right? ;-)
2021-05-14 20:30:04 +02:00
Trullemans Gregory ccbc730bab Close #55 and other UI bug fix. 2021-05-14 11:01:23 +02:00
Trullemans Gregory 720eae785b Close #45 2021-05-14 09:29:55 +02:00
Trullemans Gregory c55714540f Remise en état de fonctionnement. 2021-05-13 16:26:03 +02:00
Trullemans Gregory b879031df4 Suppression des fichiers de migrations et retour en arrière pour la config des fichiers auto. 2021-05-13 12:22:37 +02:00
Trullemans Gregory 4812a7df06 Close #42 2021-05-13 12:07:24 +02:00
Trullemans Gregory 0e5b9f53a4 bug fix and migration to Django 3.9.5 2021-05-09 19:28:35 +02:00
Trullemans Gregory 7f768895a4 Close #34 2020-11-01 16:45:11 +01:00
Trullemans Gregory 461d667f59 Close #33 2020-11-01 16:41:17 +01:00
Trullemans Gregory b73158debc Close #46 2020-11-01 16:30:17 +01:00
Trullemans Gregory 7dbf35df83 Close #20 2020-11-01 15:54:20 +01:00
Trullemans Gregory 17b379558a Close #22 2020-11-01 15:51:50 +01:00
Trullemans Gregory 920c38d963 Close #23 2020-11-01 15:49:06 +01:00
Trullemans Gregory a8acd34bdb Close #18 2020-11-01 15:46:21 +01:00
Trullemans Gregory be34c0f6a9 Bug fix and issue #19 preparation 2020-11-01 11:44:08 +01:00
Trullemans Gregory 6c03f29f3a Close #51 2020-11-01 11:17:57 +01:00
Sulley fc58a25dec Merge branch 'review/profile' of Sulley/khana into master 2020-11-01 08:44:37 +01:00
Trullemans Gregory c9197013a5 Close #16 2020-10-31 18:42:16 +01:00
Trullemans Gregory 0665a1f92a Close #14. Bug fix. 2020-10-31 18:39:09 +01:00
Fred Pauchet fbf5884fa3 Review `profile` app
In principle, it only contains documentation changes

Remarks have been sent as tickets:

* #34
* #33
2020-10-27 17:44:49 +01:00
Trullemans Gregory 4955fe232b Merge branch 'master' of https://grimbox.be/git/Sulley/khana 2020-10-26 18:36:03 +01:00
Trullemans Gregory 78637db1cb Close #15, Close #13 2020-10-26 18:35:44 +01:00
Sulley 176bdfcc9f Merge branch 'review/planning' of Sulley/khana into master 2020-10-26 11:40:47 +01:00
Sulley 15df5c74b2 Merge branch 'review/people' of Sulley/khana into master 2020-10-26 11:07:03 +01:00
Sulley 04727ce3e4 Merge branch 'review/work-environment' of Sulley/khana into master 2020-10-26 10:54:56 +01:00
Sulley 1c2e87657b Merge branch 'review/base' of Sulley/khana into master 2020-10-26 10:54:00 +01:00
Trullemans Gregory c7635e1b86 Delete some remarks. 2020-10-26 10:48:36 +01:00
Sulley ab511d7494 Merge branch 'review/communication' of Sulley/khana into master 2020-10-26 10:45:40 +01:00
Fred Pauchet 92f240a915 Première vague de questions sur la gestion des personnes. 2020-10-20 15:54:17 +02:00
Fred Pauchet 2d8cc1b764 Première passe de relecture de l'application `planning` 2020-10-20 12:15:22 +02:00
Fred Pauchet 0419a5e731 [WIP] Reviews planning application 2020-10-20 11:52:20 +02:00
Fred Pauchet 8855348ef6 Initialize .pylintrc file and adds pylint_django dep 2020-10-20 11:49:28 +02:00
Fred Pauchet 75c234be4b Review `base` application
Remove unnecessar comments
Refactor small pieces of code
Add `tests.py` for Markdown -> HTML conversio
2020-10-20 11:27:08 +02:00
384 changed files with 2737 additions and 16707 deletions

613
.pylintrc Normal file
View File

@ -0,0 +1,613 @@
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-allow-list=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
# for backward compatibility.)
extension-pkg-whitelist=
# Specify a score threshold to be exceeded before program exits with error.
fail-under=10.0
# Files or directories to be skipped. They should be base names, not paths.
ignore=CVS
# Files or directories matching the regex patterns are skipped. The regex
# matches against base names, not paths.
ignore-patterns=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
load-plugins=pylint_django
# Pickle collected data for later comparisons.
persistent=yes
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
[REPORTS]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'error', 'warning', 'refactor', and 'convention'
# which contain the number of messages in each category, as well as 'statement'
# which is the total number of statements analyzed. This score is used by the
# global evaluation report (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
#msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format=text
# Tells whether to display a full report or only the messages.
reports=no
# Activate the evaluation score.
score=yes
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit,argparse.parse_error
[STRING]
# This flag controls whether inconsistent-quotes generates a warning when the
# character used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=no
# This flag controls whether the implicit-str-concat should generate a warning
# on implicit string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=no
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[VARIABLES]
django-settings-module=config.settings
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored. Default to name
# with leading underscore.
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
[TYPECHECK]
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
# List of decorators that change the signature of a decorated function.
signature-mutators=
[LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=old
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO
# Regular expression of note tags to take in consideration.
#notes-rgx=
[BASIC]
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style.
#argument-rgx=
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style.
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma.
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Bad variable names regexes, separated by a comma. If names match any regex,
# they will always be refused
bad-names-rgxs=
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style.
#class-attribute-rgx=
# Naming style matching correct class constant names.
class-const-naming-style=UPPER_CASE
# Regular expression matching correct class constant names. Overrides class-
# const-naming-style.
#class-const-rgx=
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-
# style.
#class-rgx=
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style.
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style.
#function-rgx=
# Good variable names which should always be accepted, separated by a comma.
good-names=i,
j,
k,
ex,
Run,
_
# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=
# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style.
#inlinevar-rgx=
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style.
#method-rgx=
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style.
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style.
#variable-rgx=
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name. Available dictionaries: none. To make it work,
# install the 'python-enchant' package.
spelling-dict=
# List of comma separated words that should be considered directives if they
# appear and the beginning of a comment and should not be checked.
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains the private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to the private dictionary (see the
# --spelling-private-dict-file option) instead of raising a message.
spelling-store-unknown-words=no
[SIMILARITIES]
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
# Minimum lines number of a similarity.
min-similarity-lines=4
[DESIGN]
# Maximum number of arguments for function / method.
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of locals for function / method body.
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body.
max-returns=6
# Maximum number of statements in function / method body.
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[CLASSES]
# Warn about protected attribute access inside special methods
check-protected-access-in-special-methods=no
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp,
__post_init__
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,
_fields,
_replace,
_source,
_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=cls
[IMPORTS]
# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=optparse,tkinter.tix
# Output a graph (.gv or any supported image format) of external dependencies
# to the given file (report RP0402 must not be disabled).
ext-import-graph=
# Output a graph (.gv or any supported image format) of all (i.e. internal and
# external) dependencies to the given file (report RP0402 must not be
# disabled).
import-graph=
# Output a graph (.gv or any supported image format) of internal dependencies
# to the given file (report RP0402 must not be disabled).
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
# Makefile for khana
ifeq ($(shell which coverage >/dev/null 2>&1; echo $$?), 1)
$(error The 'coverage' command was not found. Make sure you have coverage installed)
endif
.PHONY: help coverage
help:
@echo " coverage to run coverage check of the source files."
coverage:
coverage run --source='.' manage.py test; coverage report; coverage html;
@echo "Testing of coverage in the sources finished."

1
Procfile Normal file
View File

@ -0,0 +1 @@
web: gunicorn config.wsgi

View File

@ -1,6 +1,6 @@
# Gestion de Gymnastes
Le but de cette application est de permettre une gestion des gymnastes tout au long de leur carrière : de leur premier cours à leur ultime compétition.
Le but de cette application est de permettre une gestion des gymnastes tout au long de leur carrière : de leur premier cours à leur ultime compétition.
(plus d'information à venir)
@ -63,4 +63,4 @@ Ce module permet de gérer les compétitions. (plus d'informations à venir)
## Personnes
Ce module permet de gérer les personnes. (plus d'informations à venir)
Ce module permet de gérer les personnes. (plus d'informations à venir)

View File

@ -1,94 +0,0 @@
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Mer 18 Juillet 2018 à 14:32
-- Version du serveur : 5.6.26
-- Version de PHP : 7.1.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `ffg_judging`
--
-- --------------------------------------------------------
--
-- Structure de la table `competition_availablecategory`
--
CREATE TABLE IF NOT EXISTS `competition_availablecategory` (
`id` int(11) NOT NULL,
`is_active` tinyint(1) NOT NULL,
`category_id` int(11) DEFAULT NULL,
`division_id` int(11) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;
--
-- Contenu de la table `competition_availablecategory`
--
INSERT INTO `competition_availablecategory` (`id`, `is_active`, `category_id`, `division_id`) VALUES
(1, 1, 1, 5),
(2, 1, 2, 5),
(3, 1, 3, 5),
(4, 1, 4, 1),
(5, 1, 5, 1),
(6, 1, 6, 1),
(7, 1, 7, 1),
(8, 1, 8, 1),
(9, 1, 4, 2),
(10, 1, 5, 2),
(11, 1, 6, 2),
(12, 1, 7, 2),
(13, 1, 8, 2),
(14, 1, 9, 3),
(15, 1, 10, 3),
(16, 1, 11, 3),
(17, 1, 12, 3),
(18, 1, 13, 4);
--
-- Index pour les tables exportées
--
--
-- Index pour la table `competition_availablecategory`
--
ALTER TABLE `competition_availablecategory`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `competition_availablecat_division_id_category_id_7cbea8cc_uniq` (`division_id`,`category_id`),
ADD KEY `competition_availabl_category_id_d9b4ab8c_fk_competiti` (`category_id`);
--
-- AUTO_INCREMENT pour les tables exportées
--
--
-- AUTO_INCREMENT pour la table `competition_availablecategory`
--
ALTER TABLE `competition_availablecategory`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=19;
--
-- Contraintes pour les tables exportées
--
--
-- Contraintes pour la table `competition_availablecategory`
--
ALTER TABLE `competition_availablecategory`
ADD CONSTRAINT `competition_availabl_category_id_d9b4ab8c_fk_competiti` FOREIGN KEY (`category_id`) REFERENCES `competition_category` (`id`),
ADD CONSTRAINT `competition_availabl_division_id_88e96c01_fk_competiti` FOREIGN KEY (`division_id`) REFERENCES `competition_division` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@ -1,76 +0,0 @@
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Mer 18 Juillet 2018 à 14:31
-- Version du serveur : 5.6.26
-- Version de PHP : 7.1.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `ffg_judging`
--
-- --------------------------------------------------------
--
-- Structure de la table `competition_category`
--
CREATE TABLE IF NOT EXISTS `competition_category` (
`id` int(11) NOT NULL,
`label` varchar(25) NOT NULL,
`acronym` varchar(7) NOT NULL,
`is_active` tinyint(1) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
--
-- Contenu de la table `competition_category`
--
INSERT INTO `competition_category` (`id`, `label`, `acronym`, `is_active`) VALUES
(1, '-8 ans', '-8', 1),
(2, '-9 ans', '-9', 1),
(3, '-10 ans', '-10', 1),
(4, '11 ans', '11', 1),
(5, '12 ans', '12', 1),
(6, '13-14 ans', '13-14', 1),
(7, 'Juniors', 'Ju', 1),
(8, 'Seniors', 'Se', 1),
(9, 'Niveau 1', 'N1', 1),
(10, 'Niveau 2', 'N2', 1),
(11, 'Niveau 3', 'N3', 1),
(12, 'Niveau 4', 'N4', 1),
(13, 'Bronze', 'Bronze', 1);
--
-- Index pour les tables exportées
--
--
-- Index pour la table `competition_category`
--
ALTER TABLE `competition_category`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT pour les tables exportées
--
--
-- AUTO_INCREMENT pour la table `competition_category`
--
ALTER TABLE `competition_category`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=14;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@ -1,62 +0,0 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `ffg_judging`
--
-- --------------------------------------------------------
--
-- Structure de la table `competition_division`
--
CREATE TABLE IF NOT EXISTS `competition_division` (
`id` int(11) NOT NULL,
`label` varchar(25) NOT NULL,
`acronym` varchar(5) NOT NULL,
`is_active` tinyint(1) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
--
-- Contenu de la table `competition_division`
--
INSERT INTO `competition_division` (`id`, `label`, `acronym`, `is_active`) VALUES
(1, 'Division 1', 'D1', 1),
(2, 'Division 2', 'D2', 1),
(3, 'Division 3', 'D3', 1),
(4, 'Division 4', 'D4', 1),
(5, 'Division Préparatoire', 'Prépa', 1);
--
-- Index pour les tables exportées
--
--
-- Index pour la table `competition_division`
--
ALTER TABLE `competition_division`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT pour les tables exportées
--
--
-- AUTO_INCREMENT pour la table `competition_division`
--
ALTER TABLE `competition_division`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,66 +0,0 @@
"1","Delginiesse","Lou","Acrotramp Blocry","2007-05-30","F","121510","1","64","17"
"2","Delginiesse","Léa","Acrotramp Blocry","2004-04-01","F","121509","1","24","17"
"3","Gatelier","Léa","Acrotramp Blocry","2005-09-22","F","141305","1","51","17"
"4","Henry","Océane","Acrotramp Blocry","2003-05-26","F","99539","1","20","17"
"5","Herlant","Pénéline","Acrotramp Blocry","2006-08-30","F","122578","1","40","17"
"6","Reynaert","Sara","Acrotramp Blocry","2006-02-22","F","122573","1","61","17"
"7","Trejo","Metzli","Acrotramp Blocry","2004-06-17","F","141308","1","18","17"
"8","Beauclercq","Nathan","Acrotramp Blocry","2005-01-22","M","141301","1","17","17"
"9","De Mesmaeker","Adrien","Acrotramp Blocry","2004-04-09","M","122585","1","33","17"
"10","Detalle","Mattéo","Acrotramp Blocry","2006-10-25","M","122588","1","26","17"
"11","Garcia Moreau","Matéo","Acrotramp Blocry","2005-08-24","M","99555","1","37","17"
"12","Jarman","Joshua","Acrotramp Blocry","2006-01-10","M","141315","1","11","17"
"13","Pablos Martin","Hugo","Acrotramp Blocry","2004-08-12","M","141313","1","34","17"
"14","Van Poucke Cotton","Nelson","Acrotramp Blocry","2007-01-23","M","141306","1","57","17"
"15","Vanhuffel","Trystan","Acrotramp Blocry","2005-04-03","M","141303","1","21","17"
"16","Ingels","Cedric","CGOM ASBL","2007-06-08","M","82832","1","44","17"
"17","Charles","Angelique","Acrotramp Blocry","1992-08-10","F","10900","1","5","16"
"18","Leblanc","Olivia","Acrotramp Blocry","2000-12-19","F","112449","1","59","16"
"19","Luyten","Clara","Acrotramp Blocry","2003-07-23","F","112450","1","56","16"
"20","Tombeux","Juliette","Acrotramp Blocry","2005-12-28","F","99545","1","14","16"
"21","Eglem","Elisa","Aquilon Lillois","2005-02-24","F","133827","1","27","16"
"22","Geirnaert","Marine","Aquilon Lillois","2002-11-12","F","74759","1","13","16"
"23","Kraled","Anyssa","Aquilon Lillois","2004-10-18","F","96489","1","1","16"
"24","Catteau","Marine","CGOM ASBL","2004-02-05","F","135223","1","36","16"
"25","Gaeremynck","Laurine","CGOM ASBL","2002-03-01","F","10012","1","31","16"
"26","Ernaelsten","Perrine","TRAMPO NAMUR CLUB","2004-12-09","F","54365","1","4","16"
"27","Brodzinski","Barthélemy","Acrotramp Blocry","2002-06-24","M","58261","1","49","16"
"28","Goens","François","Acrotramp Blocry","2001-08-27","M","141309","1","29","16"
"29","Le Grelle","Jérémie","Acrotramp Blocry","2000-10-24","M","96217","1","39","16"
"30","Simon","Matthias","Acrotramp Blocry","2003-02-24","M","122574","1","60","16"
"31","Devos","Hugo","CGOM ASBL","2006-05-22","M","133688","1","28","16"
"32","Dhulst","Louis","CGOM ASBL","2006-09-27","M","127026","1","54","16"
"33","Jeunehomme","Nathan","TRAMPO NAMUR CLUB","2003-03-05","M","126730","1","23","16"
"34","Breugelmans","Baptiste","Acrotramp Blocry","2002-10-21","M","122559","1","53","15"
"35","Huwaerts","Leslie","Acrotramp Blocry","2001-12-08","F","71725","1","48","15"
"36","Gheysens","Julie","CGOM ASBL","2005-06-01","F","42242","1","2","15"
"37","Herpoel","Cyrielle","CGOM ASBL","2005-10-28","F","69829","1","43","15"
"38","Platteau Holvoet","Raphael","CGOM ASBL","2005-02-25","M","120509","1","45","15"
"39","Roussel","Leina","CGOM ASBL","2004-03-17","F","80890","1","3","18"
"40","Vanbiervliet","Zoë","CGOM ASBL","2000-12-11","F","10216","1","47","14"
"41","Vandenberghe","Zélie","CGOM ASBL","2003-08-07","F","42230","1","41","14"
"42","Jacquet","Quentin","Acrotramp Blocry","2004-10-19","M","99547","1","66","14"
"43","Moens","Aymeric","Acrotramp Blocry","2001-02-26","M","58294","1","65","12"
"44","Debusschere","Tom","CGOM ASBL","2003-02-11","M","91937","1","8","14"
"45","Jaillet","Robin","CGOM ASBL","2001-06-29","M","97949","1","25","14"
"46","Scokart","Romain","Flying Acrobatics Trampoline Club","2001-12-30","M","103263","1","42","14"
"47","Herlant","Ophéliane","Acrotramp Blocry","2008-11-03","F","122577","1","15","3"
"48","Lannoye","Cédric","Acrotramp Blocry","2008-06-30","M","141316","1","38","3"
"49","May","boris","Acrotramp Blocry","2008-06-17","M","144052","1","12","3"
"50","Mean","Juliette","Acrotramp Blocry","2008-02-05","F","54451","1","35","3"
"51","Reynart","Flore","Acrotramp Blocry","2008-07-15","F","141297","1","46","3"
"52","Romain","Mathis","Acrotramp Blocry","2008-02-28","M","141307","1","50","3"
"53","Cordier","Jeanne","Acrotramp Blocry","2010-01-10","F","144055","1","58","2"
"54","Demaret","Louise","Acrotramp Blocry","2009-09-27","F","96169","1","6","2"
"55","Ebertitan","Kenza","Acrotramp Blocry","2009-06-26","F","141304","1","55","2"
"56","Halin","Axel","Acrotramp Blocry","2009-02-13","M","141310","1","9","2"
"57","Renette","Zebulon","Acrotramp Blocry","2009-02-14","M","141317","1","63","2"
"58","Mertens","Déborah","Flying Acrobatics Trampoline Club","2009-11-04","F","119801","1","16","2"
"59","Salhi","Safwane","Flying Acrobatics Trampoline Club","2001-05-30","M","4283","1","30","7"
"60","Pesesse","Lucas","Flying Acrobatics Trampoline Club","2007-07-19","M","70414","1","32","4"
"61","Carlini","Gabriel","Flying Acrobatics Trampoline Club","2006-08-11","M","103673","1","22","5"
"62","Demacker","Naomy","CGOM ASBL","2004-04-14","F","123439","1","10","11"
"63","Damri","Neila","TRAMPO NAMUR CLUB","2004-06-14","F","25026","1","62","11"
"64","Granda Martinez","Noelia","Flying Acrobatics Trampoline Club","2003-01-28","F","66196","1","52","12"
"65","Vanholder","Noah","Flying Acrobatics Trampoline Club","2003-05-21","M","101994","1","7","12"
"66","Pirson","Maxime","TRAMPO NAMUR CLUB","2000-11-08","M","24332","1","19","13"
1 1 Delginiesse Lou Acrotramp Blocry 2007-05-30 F 121510 1 64 17
2 2 Delginiesse Léa Acrotramp Blocry 2004-04-01 F 121509 1 24 17
3 3 Gatelier Léa Acrotramp Blocry 2005-09-22 F 141305 1 51 17
4 4 Henry Océane Acrotramp Blocry 2003-05-26 F 99539 1 20 17
5 5 Herlant Pénéline Acrotramp Blocry 2006-08-30 F 122578 1 40 17
6 6 Reynaert Sara Acrotramp Blocry 2006-02-22 F 122573 1 61 17
7 7 Trejo Metzli Acrotramp Blocry 2004-06-17 F 141308 1 18 17
8 8 Beauclercq Nathan Acrotramp Blocry 2005-01-22 M 141301 1 17 17
9 9 De Mesmaeker Adrien Acrotramp Blocry 2004-04-09 M 122585 1 33 17
10 10 Detalle Mattéo Acrotramp Blocry 2006-10-25 M 122588 1 26 17
11 11 Garcia Moreau Matéo Acrotramp Blocry 2005-08-24 M 99555 1 37 17
12 12 Jarman Joshua Acrotramp Blocry 2006-01-10 M 141315 1 11 17
13 13 Pablos Martin Hugo Acrotramp Blocry 2004-08-12 M 141313 1 34 17
14 14 Van Poucke Cotton Nelson Acrotramp Blocry 2007-01-23 M 141306 1 57 17
15 15 Vanhuffel Trystan Acrotramp Blocry 2005-04-03 M 141303 1 21 17
16 16 Ingels Cedric CGOM ASBL 2007-06-08 M 82832 1 44 17
17 17 Charles Angelique Acrotramp Blocry 1992-08-10 F 10900 1 5 16
18 18 Leblanc Olivia Acrotramp Blocry 2000-12-19 F 112449 1 59 16
19 19 Luyten Clara Acrotramp Blocry 2003-07-23 F 112450 1 56 16
20 20 Tombeux Juliette Acrotramp Blocry 2005-12-28 F 99545 1 14 16
21 21 Eglem Elisa Aquilon Lillois 2005-02-24 F 133827 1 27 16
22 22 Geirnaert Marine Aquilon Lillois 2002-11-12 F 74759 1 13 16
23 23 Kraled Anyssa Aquilon Lillois 2004-10-18 F 96489 1 1 16
24 24 Catteau Marine CGOM ASBL 2004-02-05 F 135223 1 36 16
25 25 Gaeremynck Laurine CGOM ASBL 2002-03-01 F 10012 1 31 16
26 26 Ernaelsten Perrine TRAMPO NAMUR CLUB 2004-12-09 F 54365 1 4 16
27 27 Brodzinski Barthélemy Acrotramp Blocry 2002-06-24 M 58261 1 49 16
28 28 Goens François Acrotramp Blocry 2001-08-27 M 141309 1 29 16
29 29 Le Grelle Jérémie Acrotramp Blocry 2000-10-24 M 96217 1 39 16
30 30 Simon Matthias Acrotramp Blocry 2003-02-24 M 122574 1 60 16
31 31 Devos Hugo CGOM ASBL 2006-05-22 M 133688 1 28 16
32 32 Dhulst Louis CGOM ASBL 2006-09-27 M 127026 1 54 16
33 33 Jeunehomme Nathan TRAMPO NAMUR CLUB 2003-03-05 M 126730 1 23 16
34 34 Breugelmans Baptiste Acrotramp Blocry 2002-10-21 M 122559 1 53 15
35 35 Huwaerts Leslie Acrotramp Blocry 2001-12-08 F 71725 1 48 15
36 36 Gheysens Julie CGOM ASBL 2005-06-01 F 42242 1 2 15
37 37 Herpoel Cyrielle CGOM ASBL 2005-10-28 F 69829 1 43 15
38 38 Platteau Holvoet Raphael CGOM ASBL 2005-02-25 M 120509 1 45 15
39 39 Roussel Leina CGOM ASBL 2004-03-17 F 80890 1 3 18
40 40 Vanbiervliet Zoë CGOM ASBL 2000-12-11 F 10216 1 47 14
41 41 Vandenberghe Zélie CGOM ASBL 2003-08-07 F 42230 1 41 14
42 42 Jacquet Quentin Acrotramp Blocry 2004-10-19 M 99547 1 66 14
43 43 Moens Aymeric Acrotramp Blocry 2001-02-26 M 58294 1 65 12
44 44 Debusschere Tom CGOM ASBL 2003-02-11 M 91937 1 8 14
45 45 Jaillet Robin CGOM ASBL 2001-06-29 M 97949 1 25 14
46 46 Scokart Romain Flying Acrobatics Trampoline Club 2001-12-30 M 103263 1 42 14
47 47 Herlant Ophéliane Acrotramp Blocry 2008-11-03 F 122577 1 15 3
48 48 Lannoye Cédric Acrotramp Blocry 2008-06-30 M 141316 1 38 3
49 49 May boris Acrotramp Blocry 2008-06-17 M 144052 1 12 3
50 50 Mean Juliette Acrotramp Blocry 2008-02-05 F 54451 1 35 3
51 51 Reynart Flore Acrotramp Blocry 2008-07-15 F 141297 1 46 3
52 52 Romain Mathis Acrotramp Blocry 2008-02-28 M 141307 1 50 3
53 53 Cordier Jeanne Acrotramp Blocry 2010-01-10 F 144055 1 58 2
54 54 Demaret Louise Acrotramp Blocry 2009-09-27 F 96169 1 6 2
55 55 Ebertitan Kenza Acrotramp Blocry 2009-06-26 F 141304 1 55 2
56 56 Halin Axel Acrotramp Blocry 2009-02-13 M 141310 1 9 2
57 57 Renette Zebulon Acrotramp Blocry 2009-02-14 M 141317 1 63 2
58 58 Mertens Déborah Flying Acrobatics Trampoline Club 2009-11-04 F 119801 1 16 2
59 59 Salhi Safwane Flying Acrobatics Trampoline Club 2001-05-30 M 4283 1 30 7
60 60 Pesesse Lucas Flying Acrobatics Trampoline Club 2007-07-19 M 70414 1 32 4
61 61 Carlini Gabriel Flying Acrobatics Trampoline Club 2006-08-11 M 103673 1 22 5
62 62 Demacker Naomy CGOM ASBL 2004-04-14 F 123439 1 10 11
63 63 Damri Neila TRAMPO NAMUR CLUB 2004-06-14 F 25026 1 62 11
64 64 Granda Martinez Noelia Flying Acrobatics Trampoline Club 2003-01-28 F 66196 1 52 12
65 65 Vanholder Noah Flying Acrobatics Trampoline Club 2003-05-21 M 101994 1 7 12
66 66 Pirson Maxime TRAMPO NAMUR CLUB 2000-11-08 M 24332 1 19 13

View File

@ -1,146 +0,0 @@
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Mar 24 Juillet 2018 à 21:42
-- Version du serveur : 5.6.26
-- Version de PHP : 7.1.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de données : `ffg_judging`
--
-- --------------------------------------------------------
--
-- Structure de la table `person_gymnast`
--
CREATE TABLE IF NOT EXISTS `person_gymnast` (
`id` int(11) NOT NULL,
`lastname` varchar(255) NOT NULL,
`firstname` varchar(255) NOT NULL,
`club` varchar(255) NOT NULL,
`birthdate` date NOT NULL,
`gender` varchar(1) NOT NULL,
`licence` int(11) DEFAULT NULL,
`is_present` tinyint(1) NOT NULL,
`bib` int(11) DEFAULT NULL,
`category_id` int(11) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8;
--
-- Contenu de la table `person_gymnast`
--
INSERT INTO `person_gymnast` (`id`, `lastname`, `firstname`, `club`, `birthdate`, `gender`, `licence`, `is_present`, `bib`, `category_id`) VALUES
(1, 'Delginiesse', 'Lou', 'Acrotramp Blocry', '2007-05-30', 'F', 121510, 1, 64, 17),
(2, 'Delginiesse', 'Léa', 'Acrotramp Blocry', '2004-04-01', 'F', 121509, 1, 24, 17),
(3, 'Gatelier', 'Léa', 'Acrotramp Blocry', '2005-09-22', 'F', 141305, 1, 51, 17),
(4, 'Henry', 'Océane', 'Acrotramp Blocry', '2003-05-26', 'F', 99539, 1, 20, 17),
(5, 'Herlant', 'Pénéline', 'Acrotramp Blocry', '2006-08-30', 'F', 122578, 1, 40, 17),
(6, 'Reynaert', 'Sara', 'Acrotramp Blocry', '2006-02-22', 'F', 122573, 1, 61, 17),
(7, 'Trejo', 'Metzli', 'Acrotramp Blocry', '2004-06-17', 'F', 141308, 1, 18, 17),
(8, 'Beauclercq', 'Nathan', 'Acrotramp Blocry', '2005-01-22', 'M', 141301, 1, 17, 17),
(9, 'De Mesmaeker', 'Adrien', 'Acrotramp Blocry', '2004-04-09', 'M', 122585, 1, 33, 17),
(10, 'Detalle', 'Mattéo', 'Acrotramp Blocry', '2006-10-25', 'M', 122588, 1, 26, 17),
(11, 'Garcia Moreau', 'Matéo', 'Acrotramp Blocry', '2005-08-24', 'M', 99555, 1, 37, 17),
(12, 'Jarman', 'Joshua', 'Acrotramp Blocry', '2006-01-10', 'M', 141315, 1, 11, 17),
(13, 'Pablos Martin', 'Hugo', 'Acrotramp Blocry', '2004-08-12', 'M', 141313, 1, 34, 17),
(14, 'Van Poucke Cotton', 'Nelson', 'Acrotramp Blocry', '2007-01-23', 'M', 141306, 1, 57, 17),
(15, 'Vanhuffel', 'Trystan', 'Acrotramp Blocry', '2005-04-03', 'M', 141303, 1, 21, 17),
(16, 'Ingels', 'Cedric', 'CGOM ASBL', '2007-06-08', 'M', 82832, 1, 44, 17),
(17, 'Charles', 'Angelique', 'Acrotramp Blocry', '1992-08-10', 'F', 10900, 1, 5, 16),
(18, 'Leblanc', 'Olivia', 'Acrotramp Blocry', '2000-12-19', 'F', 112449, 1, 59, 16),
(19, 'Luyten', 'Clara', 'Acrotramp Blocry', '2003-07-23', 'F', 112450, 1, 56, 16),
(20, 'Tombeux', 'Juliette', 'Acrotramp Blocry', '2005-12-28', 'F', 99545, 1, 14, 16),
(21, 'Eglem', 'Elisa', 'Aquilon Lillois', '2005-02-24', 'F', 133827, 1, 27, 16),
(22, 'Geirnaert', 'Marine', 'Aquilon Lillois', '2002-11-12', 'F', 74759, 1, 13, 16),
(23, 'Kraled', 'Anyssa', 'Aquilon Lillois', '2004-10-18', 'F', 96489, 1, 1, 16),
(24, 'Catteau', 'Marine', 'CGOM ASBL', '2004-02-05', 'F', 135223, 1, 36, 16),
(25, 'Gaeremynck', 'Laurine', 'CGOM ASBL', '2002-03-01', 'F', 10012, 1, 31, 16),
(26, 'Ernaelsten', 'Perrine', 'TRAMPO NAMUR CLUB', '2004-12-09', 'F', 54365, 1, 4, 16),
(27, 'Brodzinski', 'Barthélemy', 'Acrotramp Blocry', '2002-06-24', 'M', 58261, 1, 49, 16),
(28, 'Goens', 'François', 'Acrotramp Blocry', '2001-08-27', 'M', 141309, 1, 29, 16),
(29, 'Le Grelle', 'Jérémie', 'Acrotramp Blocry', '2000-10-24', 'M', 96217, 1, 39, 16),
(30, 'Simon', 'Matthias', 'Acrotramp Blocry', '2003-02-24', 'M', 122574, 1, 60, 16),
(31, 'Devos', 'Hugo', 'CGOM ASBL', '2006-05-22', 'M', 133688, 1, 28, 16),
(32, 'Dhulst', 'Louis', 'CGOM ASBL', '2006-09-27', 'M', 127026, 1, 54, 16),
(33, 'Jeunehomme', 'Nathan', 'TRAMPO NAMUR CLUB', '2003-03-05', 'M', 126730, 1, 23, 16),
(34, 'Breugelmans', 'Baptiste', 'Acrotramp Blocry', '2002-10-21', 'M', 122559, 1, 53, 15),
(35, 'Huwaerts', 'Leslie', 'Acrotramp Blocry', '2001-12-08', 'F', 71725, 1, 48, 15),
(36, 'Gheysens', 'Julie', 'CGOM ASBL', '2005-06-01', 'F', 42242, 1, 2, 15),
(37, 'Herpoel', 'Cyrielle', 'CGOM ASBL', '2005-10-28', 'F', 69829, 1, 43, 15),
(38, 'Platteau Holvoet', 'Raphael', 'CGOM ASBL', '2005-02-25', 'M', 120509, 1, 45, 15),
(39, 'Roussel', 'Leina', 'CGOM ASBL', '2004-03-17', 'F', 80890, 1, 3, 18),
(40, 'Vanbiervliet', 'Zoë', 'CGOM ASBL', '2000-12-11', 'F', 10216, 1, 47, 14),
(41, 'Vandenberghe', 'Zélie', 'CGOM ASBL', '2003-08-07', 'F', 42230, 1, 41, 14),
(42, 'Jacquet', 'Quentin', 'Acrotramp Blocry', '2004-10-19', 'M', 99547, 1, 66, 14),
(43, 'Moens', 'Aymeric', 'Acrotramp Blocry', '2001-02-26', 'M', 58294, 1, 65, 12),
(44, 'Debusschere', 'Tom', 'CGOM ASBL', '2003-02-11', 'M', 91937, 1, 8, 14),
(45, 'Jaillet', 'Robin', 'CGOM ASBL', '2001-06-29', 'M', 97949, 1, 25, 14),
(46, 'Scokart', 'Romain', 'Flying Acrobatics Trampoline Club', '2001-12-30', 'M', 103263, 1, 42, 14),
(47, 'Herlant', 'Ophéliane', 'Acrotramp Blocry', '2008-11-03', 'F', 122577, 1, 15, 3),
(48, 'Lannoye', 'Cédric', 'Acrotramp Blocry', '2008-06-30', 'M', 141316, 1, 38, 3),
(49, 'May', 'boris', 'Acrotramp Blocry', '2008-06-17', 'M', 144052, 1, 12, 3),
(50, 'Mean', 'Juliette', 'Acrotramp Blocry', '2008-02-05', 'F', 54451, 1, 35, 3),
(51, 'Reynart', 'Flore', 'Acrotramp Blocry', '2008-07-15', 'F', 141297, 1, 46, 3),
(52, 'Romain', 'Mathis', 'Acrotramp Blocry', '2008-02-28', 'M', 141307, 1, 50, 3),
(53, 'Cordier', 'Jeanne', 'Acrotramp Blocry', '2010-01-10', 'F', 144055, 1, 58, 2),
(54, 'Demaret', 'Louise', 'Acrotramp Blocry', '2009-09-27', 'F', 96169, 1, 6, 2),
(55, 'Ebertitan', 'Kenza', 'Acrotramp Blocry', '2009-06-26', 'F', 141304, 1, 55, 2),
(56, 'Halin', 'Axel', 'Acrotramp Blocry', '2009-02-13', 'M', 141310, 1, 9, 2),
(57, 'Renette', 'Zebulon', 'Acrotramp Blocry', '2009-02-14', 'M', 141317, 1, 63, 2),
(58, 'Mertens', 'Déborah', 'Flying Acrobatics Trampoline Club', '2009-11-04', 'F', 119801, 1, 16, 2),
(59, 'Salhi', 'Safwane', 'Flying Acrobatics Trampoline Club', '2001-05-30', 'M', 4283, 1, 30, 7),
(60, 'Pesesse', 'Lucas', 'Flying Acrobatics Trampoline Club', '2007-07-19', 'M', 70414, 1, 32, 4),
(61, 'Carlini', 'Gabriel', 'Flying Acrobatics Trampoline Club', '2006-08-11', 'M', 103673, 1, 22, 5),
(62, 'Demacker', 'Naomy', 'CGOM ASBL', '2004-04-14', 'F', 123439, 1, 10, 11),
(63, 'Damri', 'Neila', 'TRAMPO NAMUR CLUB', '2004-06-14', 'F', 25026, 1, 62, 11),
(64, 'Granda Martinez', 'Noelia', 'Flying Acrobatics Trampoline Club', '2003-01-28', 'F', 66196, 1, 52, 12),
(65, 'Vanholder', 'Noah', 'Flying Acrobatics Trampoline Club', '2003-05-21', 'M', 101994, 1, 7, 12),
(66, 'Pirson', 'Maxime', 'TRAMPO NAMUR CLUB', '2000-11-08', 'M', 24332, 1, 19, 13);
--
-- Index pour les tables exportées
--
--
-- Index pour la table `person_gymnast`
--
ALTER TABLE `person_gymnast`
ADD PRIMARY KEY (`id`),
ADD KEY `person_gymnast_category_id_f8d57860_fk_technic_a` (`category_id`);
--
-- AUTO_INCREMENT pour les tables exportées
--
--
-- AUTO_INCREMENT pour la table `person_gymnast`
--
ALTER TABLE `person_gymnast`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=67;
--
-- Contraintes pour les tables exportées
--
--
-- Contraintes pour la table `person_gymnast`
--
ALTER TABLE `person_gymnast`
ADD CONSTRAINT `person_gymnast_category_id_f8d57860_fk_technic_a` FOREIGN KEY (`category_id`) REFERENCES `technic_availablecategory` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@ -10,61 +10,51 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import environ
from pathlib import Path
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
env = environ.Env(
DEBUG=(bool, False)
)
env = environ.Env(DEBUG=(bool, False))
environ.Env.read_env()
DEBUG = env('DEBUG', default=True)
DEBUG = env("DEBUG", default=True)
SECRET_KEY = env('SECRET_KEY', default="6@9p0g-5ebcttbt$^*s4rda5!piezt6b7wj35g(+$mgz52k#d=")
# Parse database connection url strings like psql://user:pass@127.0.0.1:8458/db
DATABASES = {
'default': env.db('DATABASE_URL', default='sqlite:///db.sqlite3')
}
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
SECRET_KEY = env(
"SECRET_KEY", default="6@9p0g-5ebcttbt$^*s4rda5!piezt6b7wj35g(+$mgz52k#d="
)
DATABASES = {"default": env.db("DATABASE_URL", default="sqlite:///db.sqlite3")}
ALLOWED_HOSTS = ["*"]
# Application definition
INSTALLED_APPS = (
"django.contrib.contenttypes",
"django.contrib.admin",
# 'django.contrib.admindocs',
"django.contrib.auth",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django_extensions",
"people",
"location",
"planning",
"objective",
"competition",
"profile",
"tools",
"communication",
"khana.people",
"khana.location",
"khana.planning",
"khana.objective",
"khana.competition",
"khana.profile",
"khana.tools",
"khana.communication",
"rest_framework",
# 'django_spaghetti',
)
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
#'django.middleware.csrf.CsrfViewMiddleware',
@ -73,7 +63,7 @@ MIDDLEWARE = [
#'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = "khana.urls"
ROOT_URLCONF = "config.urls"
TEMPLATES = [
{
@ -114,16 +104,19 @@ LOGIN_URL = "/login/"
LOGOUT_URL = "/logout/"
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
MEDIA_URL = "/media/" # https://media.khana.be
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
STATIC_URL = "/static/"
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static"),)
MEDIA_URL = "/media/" # https://media.khana.be
STATIC_ROOT = BASE_DIR / 'staticfiles'
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
DEBUG_TOOLBAR_CONFIG = {
"JQUERY_URL": STATIC_URL + "js/jquery-2.1.4.min.js",

View File

@ -17,21 +17,22 @@ Including another URLconf
from django.urls import include, path
from django.conf.urls.static import static
from django.contrib import admin
from khana import settings
import khana.views
import planning.views
import people.views
import objective.views
import location.views
from config import settings
import location.urls
import people.urls
import objective.urls
import planning.urls
import competition.urls
import profile.urls
import communication.urls
import config.views
import khana.planning.views
import khana.people.views
import khana.objective.views
import khana.location.views
import khana.location.urls
import khana.people.urls
import khana.objective.urls
import khana.planning.urls
import khana.competition.urls
import khana.profile.urls
import khana.communication.urls
# import planningline_urlpatterns
@ -45,45 +46,45 @@ urlpatterns = [
path(r"admin/", admin.site.urls),
# url(r'^admin/jsi18n/$', include('django.views.i18n.javascript_catalog')), # pour le "ModelMultipleChoiceField" de event.forms
# Profile list
path(r"profile/", include(profile.urls.profile_urlpatterns)),
path(r"profile/", include(khana.profile.urls.profile_urlpatterns)),
# Attendance list
path(r"attendance/", include(planning.urls.attendance_urlpatterns)),
path(r"attendance/", include(khana.planning.urls.attendance_urlpatterns)),
# About competition
path(r"score/", include(competition.urls.score_urlpatterns)),
path(r"score/", include(khana.competition.urls.score_urlpatterns)),
# About gymnast
path(r"gymnast/", include(people.urls.people_urlpatterns)),
path(r"gymnast/", include(khana.people.urls.people_urlpatterns)),
# About event
path(r"event/", include(planning.urls.event_urlpatterns)),
path(r"event/", include(khana.planning.urls.event_urlpatterns)),
# About skill
path(r"skill/", include(objective.urls.skill_urlpatterns)),
path(r"skill/", include(khana.objective.urls.skill_urlpatterns)),
# About chrono
path(r"chrono/", include(objective.urls.chrono_urlpatterns)),
path(r"chrono/", include(khana.objective.urls.chrono_urlpatterns)),
# About skill
path(r"training/", include(planning.urls.training_urlpatterns)),
path(r"training/", include(khana.planning.urls.training_urlpatterns)),
# About routine
path(r"routine/", include(objective.urls.routine_urlpatterns)),
path(r"routine/", include(khana.objective.urls.routine_urlpatterns)),
# About accident
path(r"accident/", include(people.urls.accident_urlpatterns)),
path(r"accident/", include(khana.people.urls.accident_urlpatterns)),
# About unavailability
path(r"unavailability/", include(planning.urls.unavailability_urlpatterns)),
path(r"unavailability/", include(khana.planning.urls.unavailability_urlpatterns)),
# About planningline
path(r"program/", include(planning.urls.planningline_urlpatterns)),
path(r"program/", include(khana.planning.urls.planningline_urlpatterns)),
# About course
path(r"course/", include(planning.urls.course_urlpatterns)),
path(r"message/", include(communication.urls.message_urlpatterns)),
path(r"course/", include(khana.planning.urls.course_urlpatterns)),
path(r"messages/", include(khana.communication.urls.message_urlpatterns)),
# About Location
path(r"place/", include(location.urls.place_urlpatterns)),
path(r"country/", include(location.urls.country_urlpatterns)),
path(r"club/", include(location.urls.club_urlpatterns)),
path(r"place/", include(khana.location.urls.place_urlpatterns)),
path(r"country/", include(khana.location.urls.country_urlpatterns)),
path(r"club/", include(khana.location.urls.club_urlpatterns)),
# url(r'^club/', location.views.chooseStatistics),
# url(r'^club/(?P<clubid>[0-9]+)', location.views.club_statistics),
# Global search
path(r"search/", khana.views.search, name="global_search"),
path(r"search/", config.views.search, name="global_search"),
# login & logout
path(r"login/", khana.views.login, name="login"),
path(r"logout/", khana.views.logout, name="logout"),
path(r"login/", config.views.login, name="login"),
path(r"logout/", config.views.logout, name="logout"),
# Home page
path(r"", khana.views.home, name="home"),
path(r"", config.views.home, name="home"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# if settings.DEBUG:

View File

@ -1,4 +1,8 @@
# coding=UTF-8
from datetime import datetime, timedelta, date
from functools import reduce
import operator
from django.db.models import Q
from django.shortcuts import render
from django.template import RequestContext
@ -9,23 +13,20 @@ from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods
from datetime import datetime, timedelta, date
from functools import reduce
import operator
import pendulum
from planning.models import (
from khana.planning.models import (
Season,
Event,
Unavailability,
Course,
get_number_of_weeks_between,
)
from people.models import Gymnast, Accident # people model
from location.models import Club # location model
from objective.models import Skill, Routine # objective model
from profile.models import Profile
from communication.views import get_number_unreaded_message
import pendulum
from khana.people.models import Gymnast, Accident # people model
from khana.location.models import Club # location model
from khana.objective.models import Skill, Routine # objective model
from khana.profile.models import Profile
from khana.communication.views import get_number_of_unread_message
def login(request):
@ -49,7 +50,7 @@ def login(request):
request.session["template"] = profile.template_color
request.session["sidebar"] = profile.sidebar_color
request.session["is_sidebar_minified"] = profile.is_sidebar_minified
except expression as identifier:
except Exception:
pass
request.session["clubid"] = request.POST.get("clubid", None)
return HttpResponseRedirect("/")
@ -159,10 +160,10 @@ def home(request):
try:
season = Season.objects.get(datebegin__lte=today, dateend__gte=today)
except Season.DoesNotExist:
context = {"error": "No season founded."}
context = {"error": "No season found."}
return render(request, "index.html", context)
except Season.MultipleObjectsReturned:
context = {"error": "Multiple season founded."}
context = {"error": "Multiple season found."}
return render(request, "index.html", context)
week_number = season.week_number_from_begin(today)
@ -177,7 +178,7 @@ def home(request):
event_list = __getEventInfo(request)
unavailable_list = Unavailability.objects.next(5)
birthday_list = next_birthdays(request, 5)
number_unreaded_message = get_number_unreaded_message(request)
number_unreaded_message = get_number_of_unread_message(request)
courses, courses_done, courses_left = __getCourseInfo(request)
context = {
@ -246,11 +247,12 @@ def search(request):
name__icontains=pattern
) # ou gymnaste qui y participe !
gymnast_list = Gymnast.objects.filter(
Q(lastname__icontains=pattern) | Q(firstname__icontains=pattern)
Q(user__last_name__icontains=pattern)
| Q(user__first_name__icontains=pattern)
)
accident_list = Accident.objects.filter(
Q(gymnast__lastname__icontains=pattern)
| Q(gymnast__firstname__icontains=pattern)
Q(gymnast__user__last_name__icontains=pattern)
| Q(gymnast__user__first_name__icontains=pattern)
)
skill_list = Skill.objects.filter(
Q(longLabel__icontains=pattern) | Q(shortLabel__icontains=pattern)

View File

@ -11,6 +11,6 @@ import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "khana.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
application = get_wsgi_application()

1
db.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,192 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Khana.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Khana.qhc"
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Khana"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Khana"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

View File

@ -1,263 +0,0 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
set I18NSPHINXOPTS=%SPHINXOPTS% source
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Khana.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Khana.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end

View File

@ -1,299 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Khana documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 7 09:55:31 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import shlex
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../src'))
# os.environ['DJANGO_SETTINGS_MODULE'] = 'khana.settings'
# sys.path.insert(0, os.path.abspath('.'))
from django.conf import settings
settings.configure()
# import django
# django.setup()
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'Khana'
copyright = '2016, Trullemans Gregory'
author = 'Trullemans Gregory'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'fr'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
#html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Khanadoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Latex figure (float) alignment
#'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Khana.tex', 'Khana Documentation',
'Trullemans Gregory', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'khana', 'Khana Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Khana', 'Khana Documentation',
author, 'Khana', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

View File

@ -1,6 +0,0 @@
Gymnastes
=========
.. autoclass:: people.models.Gymnast
:members:

View File

@ -1,24 +0,0 @@
.. Khana documentation master file, created by
sphinx-quickstart on Thu Jan 7 09:55:31 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Khana's documentation!
=================================
Contents:
.. toctree::
:maxdepth: 2
gymnast
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -1,192 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Khana.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Khana.qhc"
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Khana"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Khana"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

View File

@ -1,297 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Khana documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 8 13:28:52 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import shlex
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../src'))
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'khana.base_settings')
import django
django.setup()
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'Khana'
copyright = '2016, Trullemans Gregory'
author = 'Trullemans Gregory'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.0.2'
# The full version, including alpha/beta/rc tags.
release = '0.0.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'fr'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
#html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Khanadoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Latex figure (float) alignment
#'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Khana.tex', 'Khana Documentation',
'Greggou', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'khana', 'Khana Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Khana', 'Khana Documentation',
author, 'Khana', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

View File

@ -1,88 +0,0 @@
********************
Application `People`
********************
Modèles
*******
Gymnaste
========
.. autoclass:: people.models.Gymnast
:members:
.. autoclass:: people.models.CanDoRelation
:members:
.. autoclass:: people.models.ToDoRelation
:members:
Accident
========
.. autoclass:: people.models.Accident
:members:
Vues
****
Gymnaste
========
.. autofunction:: people.views.gymnast_listing
.. autofunction:: people.views.gymnast_lookup
.. autofunction:: people.views.gymnast_detail
Accident
========
.. autofunction:: people.views.accident_listing
.. autofunction:: people.views.accident_create
.. autofunction:: people.views.accident_detail
Divers
======
.. autofunction:: people.views.getRandomKnownSkill
Templates tags
==============
Gymnaste
--------
.. automodule:: people.templatetags.format
:members:
Entrainement
------------
.. automodule:: people.templatetags.training
:members:
Accident
--------
.. automodule:: people.templatetags.accident
:members:
.. automodule:: people.templatetags.chronos
:members:
Event
-----
.. automodule:: people.templatetags.event
:members:
.. automodule:: people.templatetags.plannification
:members:
Statistiques
------------
.. automodule:: people.templatetags.statistics
:members:

View File

@ -1,30 +0,0 @@
.. Khana documentation master file, created by
sphinx-quickstart on Fri Jan 8 13:28:52 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
**********************************
Welcome to Khana's documentation !
**********************************
Contents:
.. toctree::
:maxdepth: 2
gymnast
location
planning
objective
******************
Indices and tables
******************
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -1,22 +0,0 @@
**********************
Application `Location`
**********************
Modèles
*******
.. autoclass:: location.models.Country
:members:
.. autoclass:: location.models.Place
:members:
.. autoclass:: location.models.Club
:members:
Vues
****
.. autofunction:: location.views.chooseStatistics
.. autofunction:: location.views.club_statistics

View File

@ -1,263 +0,0 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Khana.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Khana.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end

View File

@ -1,30 +0,0 @@
***********************
Application `Objective`
***********************
Modèles
*******
.. autoclass:: objective.models.Educative
:members:
.. autoclass:: objective.models.TouchPosition
:members:
.. autoclass:: objective.models.Skill
:members:
.. autoclass:: objective.models.Routine
:members:
.. autoclass:: objective.models.Routine_Skill
:members:
.. autoclass:: objective.models.Chrono
:members:
Vues
****
.. automodule:: objective.views
:members:

View File

@ -1,56 +0,0 @@
**********************
Application `Planning`
**********************
Modèles
*******
Génériques
==========
.. autoclass:: planning.models.Temporizable
:members:
.. autoclass:: planning.models.TemporizableQuerySet
:members:
.. automethod:: planning.models.get_number_of_weeks
Evènements
==========
.. autoclass:: planning.models.EventType
:members:
.. autoclass:: planning.models.Event
:members:
Cours et entrainements
======================
.. autoclass:: planning.models.Course
:members:
.. autoclass:: planning.models.Group
:members:
.. autoclass:: planning.models.Subgroup
:members:
.. autoclass:: planning.models.UnavailabilityManager
:members:
.. autoclass:: planning.models.Unavailability
:members:
.. autoclass:: planning.models.Training
:members:
Vues
****
.. automodule:: planning.views
:members:

24
khana/base/models.py Normal file
View File

@ -0,0 +1,24 @@
"""Ensemble des classes d'utilité publique :-)"""
from django.db import models
import markdown
class Markdownizable(models.Model):
"""Classe abstraite ajoutant un champ `content`, convertible de .md -> .html."""
class Meta:
abstract = True
content = models.TextField(
null=True,
blank=True,
verbose_name="Comments",
help_text="Seul le MarkDown simple est accepté",
)
def to_markdown(self):
"""Convertit le champ `content` en (Github-flavored) Markdown."""
return markdown.markdown(self.content)

16
khana/base/tests.py Normal file
View File

@ -0,0 +1,16 @@
"""Tests associés à la conversion de contenu Markdown en HTML."""
from django.test import TestCase
from .models import Markdownizable
class TestMarkdownizable(TestCase):
"""Vérifie les fonctionnalités associées à la classe Markdownizable.
"""
def test_to_markdown(self):
"""Vérifie qu'un contenu Markdown est correctement convertit en HTML."""
markdown_content = Markdownizable(information="# Title")
self.assertEqual(markdown_content.to_markdown(), "<h1>Title</h1>")

View File

@ -0,0 +1,16 @@
"""Module d'administration des messages."""
from django.contrib import admin
from .models import Message
@admin.register(Message)
class MessageAdmin(admin.ModelAdmin):
"""La classe `MessageAdmin` contrôle la gestion des messages
"""
list_display = ("sender", "recipient", "written_at", "is_read", "read_at")
ordering = ("written_at", "sender")
search_fields = ("sender", "recipient", "message_title")
list_filter = ("sender", "recipient")

View File

@ -2,4 +2,4 @@ from django.apps import AppConfig
class CommunicationConfig(AppConfig):
name = "communication"
name = "khana.communication"

View File

@ -1,39 +1,39 @@
"""Configuration et représentation des forms liés aux messages."""
from datetime import date
from django import forms
from people.models import Gymnast
from .models import Message
class MessageForm(forms.ModelForm):
"""Formulaire de base pour la création et la modification de messages
"""
class Meta:
model = Message
fields = (
"writer",
"reader",
"message_title",
"message_body",
"sender",
"recipient",
"title",
"body",
)
widgets = {
"writer": forms.HiddenInput(),
"reader": forms.HiddenInput(),
"message_title": forms.TextInput(
"sender": forms.HiddenInput(),
"recipient": forms.HiddenInput(),
"title": forms.TextInput(
attrs={"class": "form-control", "placeholder": "Message title"}
),
"message_body": forms.Textarea(
"body": forms.Textarea(
attrs={"class": "form-control", "placeholder": "Message body",}
),
}
reader_related = forms.CharField(
recipient_related = forms.CharField(
widget=forms.TextInput(
attrs={
"class": "form-control",
"placeholder": "Trainer search…",
"data-ref": "#id_reader",
"data-ref": "#id_recipient",
}
)
)

View File

@ -0,0 +1,63 @@
# Generated by Django 3.2.2 on 2021-05-13 10:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("communication", "0002_auto_20190413_1028"),
]
operations = [
migrations.RenameField(
model_name="message", old_name="message_body", new_name="body",
),
migrations.RenameField(
model_name="message", old_name="date_of_reading", new_name="read_at",
),
migrations.RenameField(
model_name="message", old_name="message_title", new_name="title",
),
migrations.RenameField(
model_name="message", old_name="date_of_writing", new_name="written_at",
),
migrations.RemoveField(model_name="message", name="is_read",),
migrations.RemoveField(model_name="message", name="reader",),
migrations.RemoveField(model_name="message", name="writer",),
migrations.AddField(
model_name="message",
name="content",
field=models.TextField(
blank=True,
help_text="Seul le MarkDown simple est accepté",
null=True,
verbose_name="Comments",
),
),
migrations.AddField(
model_name="message",
name="recipient",
field=models.ForeignKey(
default=1,
on_delete=django.db.models.deletion.CASCADE,
related_name="received_messages",
to="auth.user",
),
preserve_default=False,
),
migrations.AddField(
model_name="message",
name="sender",
field=models.ForeignKey(
default=1,
on_delete=django.db.models.deletion.CASCADE,
related_name="sent_messages",
to="auth.user",
),
preserve_default=False,
),
]

View File

@ -0,0 +1,49 @@
"""Modelisation de tout ce qui touche à la communication entre utilisateurs.
Cette application gère:
* Les messages
* Ah, c'est tout en fait :-)
"""
from datetime import datetime
from django.db import models
from django.contrib.auth import get_user_model
from khana.base.models import Markdownizable
User = get_user_model()
class Message(Markdownizable):
"""Représente un message échangé entre deux utilisateurs.
Attributes:
sender (User): Association à l'utilisateur qui a écrit le message.
recipient (User): Association au destinataire du message.
written_at (datetime): Date à laquelle le message a été enregistré.
read_at (datetime): Date à laquelle le message a été lu par son destinataire.
title (str): Titre ou sujet du message.
body (text): Contenu du message.
"""
sender = models.ForeignKey(
User, on_delete=models.CASCADE, related_name="sent_messages"
)
written_at = models.DateTimeField(auto_now_add=True, verbose_name="Date of writing")
recipient = models.ForeignKey(
User, on_delete=models.CASCADE, related_name="received_messages"
)
read_at = models.DateTimeField(auto_now=True, verbose_name="Date of reading")
title = models.CharField(max_length=255, verbose_name="Title")
body = models.TextField(null=True, blank=True, verbose_name="Message")
@property
def is_read(self):
return self.read_at is not None or self.read_at <= datetime.today()
def __str__(self):
return "%s - %s : %s" % (self.sender, self.written_at, self.title)

View File

@ -0,0 +1,19 @@
"""Tests liés au modèle de l'application Communication"""
from datetime import datetime
from django.contrib.auth import get_user_model
from .models import Message
User = get_user_model()
def test_message_to_string():
"""Vérifie la représentation textuelle d'un message
"""
timing = datetime.now()
user = User(username="fred", password="fredpassword")
message = Message(sender=user, written_at=timing, title="test")
assert str(message) == "fred - " + str(timing) + " : test"

View File

@ -1,18 +1,13 @@
"""Définition des routes d'actions permettant de contrôler les messages et la communication."""
from django.urls import path, re_path
from django.urls import path
from . import views
""" NOTE: Attention à bien nommer les URLs. `message_sent` -> `sent_messages`...
"""
message_urlpatterns = [
path(r"sent/", views.get_message_sent, name="message_sent"),
path(r"received/", views.get_message_received, name="message_received"),
path(r"sent/", views.get_sent_messages, name="sent_messages"),
path(r"received/", views.get_received_messages, name="received_messages"),
path(r"<int:messageid>/", views.get_message_details, name="message_details"),
path(r"delete/<int:messageid>/", views.delete_message, name="delete_message"),
path(r"compose/", views.compose_message, name="compose_message"),

View File

@ -0,0 +1,92 @@
"""Vues et fonctions pour tout ce qui touche à la communication entre plusieurs utilisateurs."""
from datetime import datetime
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.views.decorators.http import require_http_methods
from django.urls import reverse
from .forms import MessageForm
from .models import Message
@login_required
def get_number_of_unread_message(request):
"""Récupère le nombre de messages non lus associés à l'utilisateur en session.
"""
return (
Message.objects.filter(recipient=request.user)
.filter(read_at__isnull=True)
.count()
)
@login_required
@require_http_methods(["GET"])
def get_received_messages(request):
"""Récupère des messages recus pour l'utilisateur connecté.
"""
return request.user.received_messages.all()
@login_required
@require_http_methods(["GET"])
def get_sent_messages(request):
"""Récupère des messages envoyés par l'utilisateur connecté.
"""
return request.user.sent_messages.all()
@login_required
@require_http_methods(["GET"])
def get_message_details(request, messageid):
"""Récupère les détails (l'affichage ?) d'un message.
"""
message = get_object_or_404(Message, pk=messageid)
if not message.read_at and message.recipient == request.user.id:
message.read_at = datetime.now()
message.save()
context = {"message": message, "type": None}
return render(request, "message_details.html", context)
@login_required
@require_http_methods(["POST"])
def delete_message(request, messageid):
"""Supprime le message dont la clé est passée en paramètre.
"""
try:
message = Message.objects.get(pk=messageid)
if message.sender == request.user or message.recipient == request.user:
message.delete()
else:
return HttpResponse(401)
except:
return HttpResponse(400)
return HttpResponse(200)
@login_required
@require_http_methods(["GET", "POST"])
def compose_message(request):
"""Permet à l'utilisateur connecté de rédiger un nouveau message.
"""
if request.method == "POST":
form = MessageForm(request.POST)
if form.is_valid():
form.save()
return HttpResponseRedirect(reverse("sent_messages"))
print("Invalid form")
else:
form = MessageForm()
context = {"form": form, "writer": request.user.id}
return render(request, "message_create.html", context)

View File

@ -15,7 +15,6 @@ class PointAdmin(admin.ModelAdmin):
"total",
)
ordering = ("gymnast",)
# search_fields = ('longLabel', 'shortLabel')
list_filter = ("gymnast", "event", "routine_type")

View File

@ -0,0 +1,5 @@
from django.apps import AppConfig
class CompetitionConfig(AppConfig):
name = "khana.competition"

View File

@ -1,4 +1,3 @@
# coding=UTF-8
from django.db import models
@ -14,7 +13,6 @@ class Point(models.Model):
"people.Gymnast", on_delete=models.CASCADE, default=None
)
event = models.ForeignKey("planning.Event", on_delete=models.CASCADE, default=None)
# routine=models.ForeignKey('objective.Routine')
routine_type = models.PositiveSmallIntegerField(choices=ROUTINETYPE_CHOICE)
point_execution = models.DecimalField(max_digits=5, decimal_places=3)
point_difficulty = models.DecimalField(max_digits=3, decimal_places=1)
@ -24,9 +22,8 @@ class Point(models.Model):
total = models.DecimalField(max_digits=6, decimal_places=3)
def __str__(self):
return "%s, %s - %s" % (
self.gymnast.lastname,
self.gymnast.firstname,
return "%s - %s" % (
self.gymnast,
self.total,
)

View File

@ -1,12 +1,7 @@
# coding=UTF-8
import pytest
from .models import (
Point,
Competition,
Division,
Level
)
from .models import Point, Competition, Division, Level
# class TestModelCompetition(TestCase):
@ -14,6 +9,7 @@ from .models import (
# Tests relatifs à la classe `Compétition`.
# """
def test_competition_str_():
""" Vérifie la représentation textuelle de la classe. """
competition = Competition(name="Belgian Open Trampoline", acronym="BOT")
@ -25,6 +21,7 @@ def test_competition_str_():
# Tests relatifs à la classe `Division`.
# """
def test_division_str_():
""" Vérifie la représentation textuelle de la classe. """
competition = Competition(name="Belgian Open Trampoline", acronym="BOT")
@ -37,6 +34,7 @@ def test_division_str_():
# Tests relatifs à la classe `Level`.
# """
def test_level_str_():
""" Vérifie la représentation textuelle de la classe. """
competition = Competition(name="Belgian Open Trampoline", acronym="BOT")

View File

@ -1,13 +1,14 @@
# coding=UTF-8
from django.shortcuts import render, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from django.views.decorators.http import require_http_methods
from django.db.models import Q
from khana.people.models import Gymnast
from .forms import ScoreForm
from .models import Point
from people.models import Gymnast
@login_required

5
khana/location/apps.py Normal file
View File

@ -0,0 +1,5 @@
from django.apps import AppConfig
class LocationConfig(AppConfig):
name = "khana.location"

View File

@ -4,8 +4,10 @@ from django.db import models
class Country(models.Model):
"""
Classe représentant les pays (basée sur la liste ISO 3166 de 2015).
"""Classe représentant les pays (basée sur la liste ISO 3166 de 2015).
References:
https://fr.wikipedia.org/wiki/ISO_3166
"""
class Meta:
@ -46,7 +48,7 @@ class Place(models.Model):
active = models.BooleanField(default=1, verbose_name="Active")
def __str__(self):
return "%s (%s)" % (self.name, self.city)
return "%s (%s)" % (self.name, self.city if self.city else "?")
class Club(models.Model):
@ -70,4 +72,4 @@ class Club(models.Model):
active = models.BooleanField(default=1, verbose_name="Active")
def __str__(self):
return "%s%s)" % (self.name, self.place.city)
return "%s%s)" % (self.name, self.place.city if self.place.city else "?")

View File

@ -0,0 +1,43 @@
"""Tests liés au modèle des localisations, places, etc."""
from django.test import TestCase
from ..models import Club, Country, Place
class TestCountry(TestCase):
def test_str_should_contain_name_and_iso2(self):
country = Country.objects.create(
nameus="Belgium", namefr="Belgique", isonum=56, iso2="BE"
)
self.assertEqual(str(country), "Belgique (BE)")
class TestPlace(TestCase):
def test_str_should_contain_name_and_city(self):
place = Place.objects.create(
name="Heaven",
postal=1080,
country=Country.objects.create(
nameus="Belgium", namefr="Belgique", isonum=56, iso2="BE"
),
)
self.assertEqual(str(place), "Heaven (?)")
class TestClub(TestCase):
def test_str_should_contain_name_and_location(self):
club = Club.objects.create(
name="RSCA",
place=Place.objects.create(
name="Heaven",
postal=1080,
country=Country.objects.create(
nameus="Belgium", namefr="Belgique", isonum=56, iso2="BE"
),
),
)
self.assertEqual(str(club), "RSCA (à ?)")

View File

@ -1,10 +1,6 @@
# coding=UTF-8
from .models import (
Club,
Place,
Country
)
from .models import Club, Place, Country
import pytest
# class GymnastTestCase():
@ -12,11 +8,13 @@ def test_country_tostring():
c = Country(namefr="Belgique", iso2="56")
assert str(c) == "Belgique (56)"
def test_place_tostring():
p = Place(name="FATC", city="Lillois")
assert str(p) == "FATC (Lillois)"
def test_club_tostring():
p = Place(name="FATC", city="Lillois")
club = Club(place=p, name="FATC2")
assert str(club) == "FATC2 (à Lillois)"
assert str(club) == "FATC2 (à Lillois)"

View File

@ -1,34 +1,35 @@
# coding=UTF-8
from django.db.models import Q, Count
from django.shortcuts import render, get_object_or_404
from django.template import RequestContext
from django.utils.html import format_html
from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods
from datetime import datetime, timedelta, date
from functools import reduce
import operator
import simplejson
from planning.models import (
from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout
from django.contrib.auth.decorators import login_required
from django.db.models import Q, Count
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.template import RequestContext
from django.utils.html import format_html
from django.views.decorators.http import require_http_methods
from khana.planning.models import (
Event,
Unavailability,
Course,
Subgroup,
Training,
) # planning model
from people.models import Gymnast, Accident # people model
)
from khana.objective.models import Skill, Routine
from khana.people.models import Gymnast, Accident
from .models import (
Club,
Place,
Country,
)
from .forms import PlaceForm
from objective.models import Skill, Routine # objective model
def __diffTime(end, start):
@ -87,7 +88,7 @@ def place_listing(request):
"""
place_list = Place.objects.all()
context = {"place_list": place_list}
return render(request, "place_list.html", context)
return render(request, "places/list.html", context)
@login_required
@ -115,7 +116,7 @@ def place_create_or_update(request, placeid=None):
form = PlaceForm(instance=place, initial=data)
context = {"form": form, "placeid": placeid}
return render(request, "place_create.html", context)
return render(request, "places/create.html", context)
@login_required
@ -126,7 +127,7 @@ def place_details(request, placeid):
"""
place = get_object_or_404(Place, pk=placeid)
context = {"place": place}
return render(request, "place_details.html", context)
return render(request, "places/details.html", context)
@login_required

View File

@ -1,7 +1,8 @@
import math
from people.models import Gymnast
from objectives.models import Skill
from khana.people.models import Gymnast
from khana.objective.models import Skill
def suggest_routine(
@ -22,7 +23,7 @@ def suggest_routine(
logic (bool): indique si la série doit suivre certaines règles de logique (sportive).
gymnast (gymnast): gymnaste.
last_jump (skill): dernier saut sélectionné pour la série.
Returns:
??? (list): liste des séries correspondantes aux criètres.
"""
@ -58,16 +59,17 @@ def suggest_routine(
for skill in skill_list:
current_routine.append(skill)
current_routine.append(
self.suggest_routine(
request,
total_difficulty_score - skill.difficulty,
max_difficulty_score,
routine_length - 1,
competition,
logic,
gymnast,
skill,
)
None
# suggest_routine()
# request,
# total_difficulty_score - skill.difficulty,
# max_difficulty_score,
# routine_length - 1,
# competition,
# logic,
# gymnast,
# skill,
# )
)
current_routine.pop()
# def knapSack(W, wt, val, n):

View File

@ -1,12 +1,12 @@
from django.contrib import admin
# Register your models here.
from .models import (
Educative,
TouchPosition,
Skill,
Routine,
Routine_Skill,
RoutineSkill,
Chrono,
)
from django_extensions.admin import ForeignKeyAutocompleteAdmin
@ -15,10 +15,10 @@ from django_extensions.admin import ForeignKeyAutocompleteAdmin
class TouchPositionAdmin(admin.ModelAdmin):
model = TouchPosition
list_display = ("longLabel", "shortLabel", "competition", "default")
ordering = ("longLabel", "shortLabel")
search_fields = ("longLabel", "shortLabel")
list_filter = ("competition",)
list_display = ("label", "short_label", "allowed_in_competition", "is_default")
ordering = ("label", "short_label")
search_fields = ("label", "short_label")
list_filter = ("allowed_in_competition",)
def duplicate_skill(self, SkillAdmin, request, queryset):
@ -30,17 +30,13 @@ def duplicate_skill(self, SkillAdmin, request, queryset):
class SkillAdmin(ForeignKeyAutocompleteAdmin):
model = Skill
# related_search_fields = {
# 'departure': ('longLabel', 'shortLabel'),
# 'landing': ('longLabel', 'shortLabel')
# }
fields = (
"longLabel",
"shortLabel",
"long_label",
"short_label",
"information",
"departure",
"landing",
"rotationType",
"rotation_type",
"position",
"rotation",
"twist",
@ -48,41 +44,41 @@ class SkillAdmin(ForeignKeyAutocompleteAdmin):
"level",
"rank",
"notation",
"simplyNotation",
"simplified_notation",
"is_competitive",
"ageBoy",
"ageGirl",
"prerequisite",
"educative",
"age_boy",
"age_girl",
"prerequisites",
"educatives",
)
list_display = (
"longLabel",
"long_label",
"difficulty",
"is_competitive",
"level",
"rank",
"notation",
"ageBoy",
"ageGirl",
"age_boy",
"age_girl",
)
# list_display = ('longLabel', 'shortLabel', 'prerequisite')
ordering = ("longLabel", "shortLabel")
search_fields = ("rank", "longLabel", "shortLabel")
ordering = ("long_label", "short_label")
search_fields = ("rank", "long_label", "short_label")
list_filter = (
"is_competitive",
"departure",
"landing",
"rotationType",
"rotation_type",
"rank",
"rotation",
"level",
"difficulty",
"ageBoy",
"ageGirl",
"age_boy",
"age_girl",
)
filter_horizontal = ("educative", "prerequisite")
filter_horizontal = ("educatives", "prerequisites")
duplicate_skill.short_description = "Duplicate selected record"
@ -94,21 +90,21 @@ class RoutineAdmin(admin.ModelAdmin):
model = Routine
fields = (
"longLabel",
"shortLabel",
"long_label",
"short_label",
"difficulty",
"level",
"rank",
"educative",
"prerequisite",
"ageBoy",
"ageGirl",
"educatives",
"prerequisites",
"age_boy",
"age_girl",
"active",
"is_competitive",
)
list_display = (
"longLabel",
"shortLabel",
"long_label",
"short_label",
"is_competitive",
"active",
"level",
@ -117,29 +113,29 @@ class RoutineAdmin(admin.ModelAdmin):
)
list_filter = ("level", "difficulty", "is_competitive", "active")
search_fields = (
"longLabel",
"shortLabel",
"long_label",
"short_label",
)
filter_horizontal = ("educative",)
filter_horizontal = ("educatives",)
class Media:
js = ("js/routine.js",)
# TODO: ne proposer QUE les SKILL comme educatif
def get_related_filter(self, model, request):
# print('boum')
if not issubclass(model, Educative):
return super(Skill, self).get_related_filter(model, request)
# def get_related_filter(self, model, request):
# # print('boum')
# if not issubclass(model, Educative):
# return super(Skill, self).get_related_filter(model, request)
class RoutineSkillAdmin(admin.ModelAdmin):
model = Routine_Skill
model = RoutineSkill
list_display = ("routine", "skill", "rank")
search_fields = (
"routine__longLabel",
"routine__shortLabel",
"routine__label",
"routine__short_label",
)
ordering = ("routine",)
@ -153,7 +149,7 @@ class ChronoAdmin(ForeignKeyAutocompleteAdmin):
related_search_fields = {
"gymnast": ("lastname", "firstname"),
"routine": ("longLabel", "shortLabel"),
"routine": ("label", "short_label"),
}
@ -161,5 +157,5 @@ class ChronoAdmin(ForeignKeyAutocompleteAdmin):
admin.site.register(TouchPosition, TouchPositionAdmin)
admin.site.register(Skill, SkillAdmin)
admin.site.register(Routine, RoutineAdmin)
admin.site.register(Routine_Skill, RoutineSkillAdmin)
admin.site.register(RoutineSkill, RoutineSkillAdmin)
admin.site.register(Chrono, ChronoAdmin)

5
khana/objective/apps.py Normal file
View File

@ -0,0 +1,5 @@
from django.apps import AppConfig
class ObjectiveConfig(AppConfig):
name = "khana.objective"

View File

@ -2,19 +2,19 @@
from django import forms
from datetime import date
from .models import Routine, Routine_Skill, Chrono
from .models import Routine, RoutineSkill, Chrono
class RoutineForm(forms.ModelForm):
class Meta:
model = Routine
fields = ("longLabel", "shortLabel", "difficulty", "level", "active")
fields = ("long_label", "short_label", "difficulty", "level", "active")
widgets = {
# Champs obligatoires de la classe mère.
"longLabel": forms.TextInput(
"long_label": forms.TextInput(
attrs={"class": "form-control", "placeholder": "Routine's long name"}
),
"shortLabel": forms.TextInput(
"short_label": forms.TextInput(
attrs={"class": "form-control", "placeholder": "Routine's short name"}
),
"difficulty": forms.HiddenInput(),

View File

@ -2,7 +2,7 @@
from django.db import migrations, models
import django.db.models.deletion
import objective.models
import khana.objective.models
class Migration(migrations.Migration):
@ -28,7 +28,7 @@ class Migration(migrations.Migration):
model_name="skill",
name="departure",
field=models.ForeignKey(
default=objective.models.get_default_position,
default=khana.objective.models.get_default_position,
on_delete=django.db.models.deletion.CASCADE,
related_name="depart_of",
to="objective.TouchPosition",
@ -39,7 +39,7 @@ class Migration(migrations.Migration):
model_name="skill",
name="landing",
field=models.ForeignKey(
default=objective.models.get_default_position,
default=khana.objective.models.get_default_position,
on_delete=django.db.models.deletion.CASCADE,
related_name="landing_of",
to="objective.TouchPosition",

View File

@ -0,0 +1,16 @@
# Generated by Django 3.2.2 on 2021-05-13 10:58
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("objective", "0015_auto_20190524_1211"),
]
operations = [
migrations.RenameField(
model_name="educative", old_name="information", new_name="content",
),
]

View File

@ -0,0 +1,75 @@
# Generated by Django 3.2.2 on 2021-06-20 16:18
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("objective", "0016_rename_information_educative_content"),
]
operations = [
migrations.RenameModel(old_name="Routine_Skill", new_name="RoutineSkill",),
migrations.AlterModelOptions(
name="educative",
options={
"ordering": ["label", "short_label"],
"verbose_name": "Educatif",
"verbose_name_plural": "Educatifs",
},
),
migrations.AlterModelOptions(
name="touchposition",
options={
"ordering": [
"label",
"short_label",
"is_default",
"allowed_in_competition",
],
"verbose_name": "Landing",
"verbose_name_plural": "Landings",
},
),
migrations.RenameField(
model_name="educative", old_name="ageBoy", new_name="age_boy",
),
migrations.RenameField(
model_name="educative", old_name="ageGirl", new_name="age_girl",
),
migrations.RenameField(
model_name="educative", old_name="educative", new_name="educatives",
),
migrations.RenameField(
model_name="educative", old_name="longLabel", new_name="label",
),
migrations.RenameField(
model_name="educative", old_name="prerequisite", new_name="prerequisites",
),
migrations.RenameField(
model_name="educative", old_name="shortLabel", new_name="short_label",
),
migrations.RenameField(
model_name="skill", old_name="rotationType", new_name="rotation_type",
),
migrations.RenameField(
model_name="skill",
old_name="simplyNotation",
new_name="simplified_notation",
),
migrations.RenameField(
model_name="touchposition",
old_name="competition",
new_name="allowed_in_competition",
),
migrations.RenameField(
model_name="touchposition", old_name="default", new_name="is_default",
),
migrations.RenameField(
model_name="touchposition", old_name="longLabel", new_name="label",
),
migrations.RenameField(
model_name="touchposition", old_name="shortLabel", new_name="short_label",
),
]

Some files were not shown because too many files have changed in this diff Show More