mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 02:54:20 +00:00
6180 lines
197 KiB
HTML
6180 lines
197 KiB
HTML
|
|
<!doctype html>
|
|
<html lang="fr" class="no-js">
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
<meta name="description" content="Le site de l'association des étudiants de l'UTBM">
|
|
|
|
|
|
|
|
<link rel="canonical" href="https://ae-utbm.github.io/sith/reference/club/views/">
|
|
|
|
|
|
<link rel="prev" href="../models/">
|
|
|
|
|
|
<link rel="next" href="../../com/models/">
|
|
|
|
|
|
<link rel="icon" href="../../../img/favicon.png">
|
|
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.40">
|
|
|
|
|
|
|
|
<title>Views - Site AE UTBM</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../../assets/stylesheets/main.8c3ca2c6.min.css">
|
|
|
|
|
|
<link rel="stylesheet" href="../../../assets/stylesheets/palette.06af60db.min.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
|
|
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../../assets/_mkdocstrings.css">
|
|
|
|
<link rel="stylesheet" href="../../../stylesheets/extra.css">
|
|
|
|
<script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="deeppurple" data-md-color-accent="deeppurple">
|
|
|
|
|
|
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
|
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
|
<label class="md-overlay" for="__drawer"></label>
|
|
<div data-md-component="skip">
|
|
|
|
|
|
<a href="#club.views.ClubEditForm" class="md-skip">
|
|
Aller au contenu
|
|
</a>
|
|
|
|
</div>
|
|
<div data-md-component="announce">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<header class="md-header md-header--shadow" data-md-component="header">
|
|
<nav class="md-header__inner md-grid" aria-label="En-tête">
|
|
<a href="../../.." title="Site AE UTBM" class="md-header__button md-logo" aria-label="Site AE UTBM" data-md-component="logo">
|
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
|
|
|
|
</a>
|
|
<label class="md-header__button md-icon" for="__drawer">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
|
|
</label>
|
|
<div class="md-header__title" data-md-component="header-title">
|
|
<div class="md-header__ellipsis">
|
|
<div class="md-header__topic">
|
|
<span class="md-ellipsis">
|
|
Site AE UTBM
|
|
</span>
|
|
</div>
|
|
<div class="md-header__topic" data-md-component="header-topic">
|
|
<span class="md-ellipsis">
|
|
|
|
Views
|
|
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<form class="md-header__option" data-md-component="palette">
|
|
|
|
|
|
|
|
|
|
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="deeppurple" data-md-color-accent="deeppurple" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_0">
|
|
|
|
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h10a5 5 0 0 0 5-5 5 5 0 0 0-5-5m0 8a3 3 0 0 1-3-3 3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1-3 3"/></svg>
|
|
</label>
|
|
|
|
|
|
|
|
|
|
|
|
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="blue" data-md-color-accent="blue" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1">
|
|
|
|
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6m0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4M7 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"/></svg>
|
|
</label>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
|
|
|
|
|
|
|
|
<label class="md-header__button md-icon" for="__search">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
|
|
</label>
|
|
<div class="md-search" data-md-component="search" role="dialog">
|
|
<label class="md-search__overlay" for="__search"></label>
|
|
<div class="md-search__inner" role="search">
|
|
<form class="md-search__form" name="search">
|
|
<input type="text" class="md-search__input" name="query" aria-label="Rechercher" placeholder="Rechercher" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
|
|
<label class="md-search__icon md-icon" for="__search">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
|
|
</label>
|
|
<nav class="md-search__options" aria-label="Recherche">
|
|
|
|
<button type="reset" class="md-search__icon md-icon" title="Effacer" aria-label="Effacer" tabindex="-1">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
|
|
</button>
|
|
</nav>
|
|
|
|
</form>
|
|
<div class="md-search__output">
|
|
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
|
|
<div class="md-search-result" data-md-component="search-result">
|
|
<div class="md-search-result__meta">
|
|
Initialisation de la recherche
|
|
</div>
|
|
<ol class="md-search-result__list" role="presentation"></ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="md-header__source">
|
|
<a href="https://github.com/ae-utbm/sith" title="Aller au dépôt" class="md-source" data-md-component="source">
|
|
<div class="md-source__icon md-icon">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
|
|
</div>
|
|
<div class="md-source__repository">
|
|
sith
|
|
</div>
|
|
</a>
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
<div class="md-container" data-md-component="container">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<main class="md-main" data-md-component="main">
|
|
<div class="md-main__inner md-grid">
|
|
|
|
|
|
|
|
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
|
|
<div class="md-sidebar__scrollwrap">
|
|
<div class="md-sidebar__inner">
|
|
|
|
|
|
|
|
|
|
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
|
<label class="md-nav__title" for="__drawer">
|
|
<a href="../../.." title="Site AE UTBM" class="md-nav__button md-logo" aria-label="Site AE UTBM" data-md-component="logo">
|
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
|
|
|
|
</a>
|
|
Site AE UTBM
|
|
</label>
|
|
|
|
<div class="md-nav__source">
|
|
<a href="https://github.com/ae-utbm/sith" title="Aller au dépôt" class="md-source" data-md-component="source">
|
|
<div class="md-source__icon md-icon">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81"/></svg>
|
|
</div>
|
|
<div class="md-source__repository">
|
|
sith
|
|
</div>
|
|
</a>
|
|
</div>
|
|
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../.." class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Accueil
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Explications
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_2">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Explications
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../explanation/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Accueil
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../explanation/technos/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Technologies utilisées
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../explanation/conventions/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Conventions
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../explanation/archives/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Archives
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Tutoriels
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_3">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Tutoriels
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../tutorial/install/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Installer le projet
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../tutorial/install-advanced/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Installer le projet (avancé)
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../tutorial/devtools/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Configurer son éditeur
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../tutorial/structure/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Structure du projet
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../tutorial/perms/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Gestion des permissions
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../tutorial/groups/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Gestion des groupes
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../tutorial/etransaction/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Etransactions
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
How-to
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_4">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
How-to
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/querysets/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
L'ORM de Django
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/migrations/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Gérer les migrations
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/translation/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Gérer les traductions
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/statics/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Gérer les statics
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/js-import-paths/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Ajouter un chemin d'import javascript
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/prod/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Configurer pour la production
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/logo/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Ajouter un logo de promo
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/subscriptions/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Ajouter une cotisation
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/weekmail/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Modifier le weekmail
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/terminal/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Terminal
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../../howto/direnv/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Direnv
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" checked>
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Reference
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="true">
|
|
<label class="md-nav__title" for="__nav_5">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Reference
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_1" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_1" id="__nav_5_1_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
accounting
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_1_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_1">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
accounting
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../accounting/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../accounting/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_2" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_2" id="__nav_5_2_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
antispam
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_2_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_2">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
antispam
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../antispam/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../antispam/forms/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Forms
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_3" checked>
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_3" id="__nav_5_3_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
club
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_3_label" aria-expanded="true">
|
|
<label class="md-nav__title" for="__nav_5_3">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
club
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--active">
|
|
|
|
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
|
|
|
|
|
|
|
|
<label class="md-nav__link md-nav__link--active" for="__toc">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<a href="./" class="md-nav__link md-nav__link--active">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<nav class="md-nav md-nav--secondary" aria-label="Table des matières">
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table des matières
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubEditForm" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubEditForm
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMemberForm" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubMemberForm
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ClubMemberForm">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMemberForm.clean_users" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
clean_users
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMemberForm.clean" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
clean
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingForm" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingForm
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="MailingForm">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingForm.check_required" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
check_required
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingForm.clean_subscription_users" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
clean_subscription_users
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.SellingsForm" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
SellingsForm
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Club
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Club">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.check_loop" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
check_loop
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.is_owned_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
is_owned_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.can_be_edited_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
can_be_edited_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.can_be_viewed_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
can_be_viewed_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.get_membership_for" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
get_membership_for
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Mailing" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Mailing
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingSubscription" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingSubscription
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Membership" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Membership
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Membership">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Membership.is_owned_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
is_owned_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Membership.can_be_edited_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
can_be_edited_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubTabsMixin" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubTabsMixin
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubListView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubListView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubRevView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubRevView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubPageEditView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubPageEditView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubPageHistView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubPageHistView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubToolsView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubToolsView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMembersView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubMembersView
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ClubMembersView">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMembersView.form_valid" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
form_valid
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubOldMembersView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubOldMembersView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubSellingView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubSellingView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubSellingCSVView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubSellingCSVView
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ClubSellingCSVView">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubSellingCSVView.StreamWriter" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
StreamWriter
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubEditView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubEditView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubEditPropView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubEditPropView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubCreateView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubCreateView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MembershipSetOldView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MembershipSetOldView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MembershipDeleteView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MembershipDeleteView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubStatView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubStatView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMailingView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubMailingView
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ClubMailingView">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMailingView.add_new_mailing" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
add_new_mailing
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMailingView.add_new_subscription" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
add_new_subscription
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMailingView.remove_subscription" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
remove_subscription
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingDeleteView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingDeleteView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingSubscriptionDeleteView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingSubscriptionDeleteView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingAutoGenerationView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingAutoGenerationView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.PosterListView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
PosterListView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.PosterCreateView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
PosterCreateView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.PosterEditView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
PosterEditView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.PosterDeleteView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
PosterDeleteView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_4" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_4" id="__nav_5_4_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
com
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_4_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_4">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
com
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../com/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../com/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_5" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_5" id="__nav_5_5_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
core
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_5_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_5">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
core
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../core/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../core/model_fields/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Champs de modèle
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../core/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../core/schemas/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Schemas
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../core/api_permissions/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Api permissions
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_6" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_6" id="__nav_5_6_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
counter
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_6_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_6">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
counter
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../counter/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../counter/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../counter/schemas/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Schemas
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_7" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_7" id="__nav_5_7_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
eboutic
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_7_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_7">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
eboutic
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../eboutic/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../eboutic/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_8" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_8" id="__nav_5_8_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
election
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_8_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_8">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
election
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../election/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../election/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_9" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_9" id="__nav_5_9_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
forum
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_9_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_9">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
forum
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../forum/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../forum/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_10" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_10" id="__nav_5_10_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
galaxy
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_10_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_10">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
galaxy
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../galaxy/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../galaxy/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_11" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_11" id="__nav_5_11_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
launderette
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_11_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_11">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
launderette
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../launderette/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../launderette/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_12" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_12" id="__nav_5_12_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
matmat
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_12_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_12">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
matmat
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../matmat/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../matmat/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_13" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_13" id="__nav_5_13_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
pedagogy
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_13_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_13">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
pedagogy
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../pedagogy/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../pedagogy/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../pedagogy/schemas/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Schemas
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_14" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_14" id="__nav_5_14_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
rootplace
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_14_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_14">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
rootplace
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../rootplace/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../rootplace/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_15" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_15" id="__nav_5_15_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
sas
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_15_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_15">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
sas
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../sas/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../sas/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../sas/schemas/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Schemas
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_16" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_16" id="__nav_5_16_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
staticfiles
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_16_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_16">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
staticfiles
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../staticfiles/apps/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Apps
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../staticfiles/storage/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Storage
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../staticfiles/finders/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Finders
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../staticfiles/processors/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Processors
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_17" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_17" id="__nav_5_17_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
subscription
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_17_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_17">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
subscription
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../subscription/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../subscription/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_18" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5_18" id="__nav_5_18_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
trombi
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_18_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5_18">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
trombi
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../trombi/models/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Models
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../trombi/views/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Views
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
|
|
<div class="md-sidebar__scrollwrap">
|
|
<div class="md-sidebar__inner">
|
|
|
|
|
|
<nav class="md-nav md-nav--secondary" aria-label="Table des matières">
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table des matières
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubEditForm" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubEditForm
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMemberForm" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubMemberForm
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ClubMemberForm">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMemberForm.clean_users" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
clean_users
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMemberForm.clean" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
clean
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingForm" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingForm
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="MailingForm">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingForm.check_required" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
check_required
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingForm.clean_subscription_users" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
clean_subscription_users
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.SellingsForm" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
SellingsForm
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Club
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Club">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.check_loop" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
check_loop
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.is_owned_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
is_owned_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.can_be_edited_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
can_be_edited_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.can_be_viewed_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
can_be_viewed_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Club.get_membership_for" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
get_membership_for
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Mailing" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Mailing
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingSubscription" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingSubscription
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Membership" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Membership
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Membership">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Membership.is_owned_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
is_owned_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.Membership.can_be_edited_by" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
can_be_edited_by
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubTabsMixin" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubTabsMixin
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubListView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubListView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubRevView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubRevView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubPageEditView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubPageEditView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubPageHistView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubPageHistView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubToolsView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubToolsView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMembersView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubMembersView
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ClubMembersView">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMembersView.form_valid" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
form_valid
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubOldMembersView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubOldMembersView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubSellingView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubSellingView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubSellingCSVView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubSellingCSVView
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ClubSellingCSVView">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubSellingCSVView.StreamWriter" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
StreamWriter
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubEditView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubEditView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubEditPropView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubEditPropView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubCreateView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubCreateView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MembershipSetOldView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MembershipSetOldView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MembershipDeleteView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MembershipDeleteView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubStatView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubStatView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMailingView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
ClubMailingView
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="ClubMailingView">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMailingView.add_new_mailing" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
add_new_mailing
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMailingView.add_new_subscription" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
add_new_subscription
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.ClubMailingView.remove_subscription" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
remove_subscription
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingDeleteView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingDeleteView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingSubscriptionDeleteView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingSubscriptionDeleteView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.MailingAutoGenerationView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
MailingAutoGenerationView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.PosterListView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
PosterListView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.PosterCreateView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
PosterCreateView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.PosterEditView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
PosterEditView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#club.views.PosterDeleteView" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
PosterDeleteView
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-content" data-md-component="content">
|
|
<article class="md-content__inner md-typeset">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h1>Views</h1>
|
|
|
|
<div class="doc doc-object doc-module">
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-contents first">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubEditForm" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">ClubEditForm</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.ClubEditForm" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ModelForm</code></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/forms.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-41">41</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-42">42</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-43">43</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-41"><a id="__codelineno-0-41" name="__codelineno-0-41"></a><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
|
</span><span id="__span-0-42"><a id="__codelineno-0-42" name="__codelineno-0-42"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
|
</span><span id="__span-0-43"><a id="__codelineno-0-43" name="__codelineno-0-43"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"short_description"</span><span class="p">]</span><span class="o">.</span><span class="n">widget</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">Textarea</span><span class="p">()</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubMemberForm" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">ClubMemberForm</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.ClubMemberForm" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>Form</code></p>
|
|
|
|
|
|
<p>Form handling the members of a club.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/forms.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-187">187</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-188">188</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-189">189</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-190">190</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-191">191</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-192">192</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-193">193</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-194">194</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-195">195</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-196">196</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-197">197</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-198">198</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-199">199</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-200">200</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-201">201</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-202">202</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-203">203</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-204">204</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-205">205</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-206">206</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-207">207</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-208">208</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-209">209</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-210">210</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-211">211</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-212">212</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-213">213</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-214">214</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-215">215</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-216">216</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-217">217</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-218">218</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-219">219</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-220">220</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-221">221</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-222">222</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-223">223</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-224">224</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-225">225</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-226">226</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-227">227</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-228">228</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-229">229</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-187"><a id="__codelineno-0-187" name="__codelineno-0-187"></a><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
|
</span><span id="__span-0-188"><a id="__codelineno-0-188" name="__codelineno-0-188"></a> <span class="bp">self</span><span class="o">.</span><span class="n">club</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"club"</span><span class="p">)</span>
|
|
</span><span id="__span-0-189"><a id="__codelineno-0-189" name="__codelineno-0-189"></a> <span class="bp">self</span><span class="o">.</span><span class="n">request_user</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"request_user"</span><span class="p">)</span>
|
|
</span><span id="__span-0-190"><a id="__codelineno-0-190" name="__codelineno-0-190"></a> <span class="bp">self</span><span class="o">.</span><span class="n">club_members</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"club_members"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
|
|
</span><span id="__span-0-191"><a id="__codelineno-0-191" name="__codelineno-0-191"></a> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">club_members</span><span class="p">:</span>
|
|
</span><span id="__span-0-192"><a id="__codelineno-0-192" name="__codelineno-0-192"></a> <span class="bp">self</span><span class="o">.</span><span class="n">club_members</span> <span class="o">=</span> <span class="p">(</span>
|
|
</span><span id="__span-0-193"><a id="__codelineno-0-193" name="__codelineno-0-193"></a> <span class="bp">self</span><span class="o">.</span><span class="n">club</span><span class="o">.</span><span class="n">members</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">end_date</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span><span class="o">.</span><span class="n">order_by</span><span class="p">(</span><span class="s2">"-role"</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
|
|
</span><span id="__span-0-194"><a id="__codelineno-0-194" name="__codelineno-0-194"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-195"><a id="__codelineno-0-195" name="__codelineno-0-195"></a> <span class="bp">self</span><span class="o">.</span><span class="n">request_user_membership</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">club</span><span class="o">.</span><span class="n">get_membership_for</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">request_user</span><span class="p">)</span>
|
|
</span><span id="__span-0-196"><a id="__codelineno-0-196" name="__codelineno-0-196"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
|
</span><span id="__span-0-197"><a id="__codelineno-0-197" name="__codelineno-0-197"></a>
|
|
</span><span id="__span-0-198"><a id="__codelineno-0-198" name="__codelineno-0-198"></a> <span class="c1"># Using a ModelForm binds too much the form with the model and we don't want that</span>
|
|
</span><span id="__span-0-199"><a id="__codelineno-0-199" name="__codelineno-0-199"></a> <span class="c1"># We want the view to process the model creation since they are multiple users</span>
|
|
</span><span id="__span-0-200"><a id="__codelineno-0-200" name="__codelineno-0-200"></a> <span class="c1"># We also want the form to handle bulk deletion</span>
|
|
</span><span id="__span-0-201"><a id="__codelineno-0-201" name="__codelineno-0-201"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="o">.</span><span class="n">update</span><span class="p">(</span>
|
|
</span><span id="__span-0-202"><a id="__codelineno-0-202" name="__codelineno-0-202"></a> <span class="n">forms</span><span class="o">.</span><span class="n">fields_for_model</span><span class="p">(</span>
|
|
</span><span id="__span-0-203"><a id="__codelineno-0-203" name="__codelineno-0-203"></a> <span class="n">Membership</span><span class="p">,</span>
|
|
</span><span id="__span-0-204"><a id="__codelineno-0-204" name="__codelineno-0-204"></a> <span class="n">fields</span><span class="o">=</span><span class="p">(</span><span class="s2">"role"</span><span class="p">,</span> <span class="s2">"start_date"</span><span class="p">,</span> <span class="s2">"description"</span><span class="p">),</span>
|
|
</span><span id="__span-0-205"><a id="__codelineno-0-205" name="__codelineno-0-205"></a> <span class="n">widgets</span><span class="o">=</span><span class="p">{</span><span class="s2">"start_date"</span><span class="p">:</span> <span class="n">SelectDate</span><span class="p">},</span>
|
|
</span><span id="__span-0-206"><a id="__codelineno-0-206" name="__codelineno-0-206"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-207"><a id="__codelineno-0-207" name="__codelineno-0-207"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-208"><a id="__codelineno-0-208" name="__codelineno-0-208"></a>
|
|
</span><span id="__span-0-209"><a id="__codelineno-0-209" name="__codelineno-0-209"></a> <span class="c1"># Role is required only if users is specified</span>
|
|
</span><span id="__span-0-210"><a id="__codelineno-0-210" name="__codelineno-0-210"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"role"</span><span class="p">]</span><span class="o">.</span><span class="n">required</span> <span class="o">=</span> <span class="kc">False</span>
|
|
</span><span id="__span-0-211"><a id="__codelineno-0-211" name="__codelineno-0-211"></a>
|
|
</span><span id="__span-0-212"><a id="__codelineno-0-212" name="__codelineno-0-212"></a> <span class="c1"># Start date and description are never really required</span>
|
|
</span><span id="__span-0-213"><a id="__codelineno-0-213" name="__codelineno-0-213"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"start_date"</span><span class="p">]</span><span class="o">.</span><span class="n">required</span> <span class="o">=</span> <span class="kc">False</span>
|
|
</span><span id="__span-0-214"><a id="__codelineno-0-214" name="__codelineno-0-214"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"description"</span><span class="p">]</span><span class="o">.</span><span class="n">required</span> <span class="o">=</span> <span class="kc">False</span>
|
|
</span><span id="__span-0-215"><a id="__codelineno-0-215" name="__codelineno-0-215"></a>
|
|
</span><span id="__span-0-216"><a id="__codelineno-0-216" name="__codelineno-0-216"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"users_old"</span><span class="p">]</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">ModelMultipleChoiceField</span><span class="p">(</span>
|
|
</span><span id="__span-0-217"><a id="__codelineno-0-217" name="__codelineno-0-217"></a> <span class="n">User</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
|
|
</span><span id="__span-0-218"><a id="__codelineno-0-218" name="__codelineno-0-218"></a> <span class="n">id__in</span><span class="o">=</span><span class="p">[</span>
|
|
</span><span id="__span-0-219"><a id="__codelineno-0-219" name="__codelineno-0-219"></a> <span class="n">ms</span><span class="o">.</span><span class="n">user</span><span class="o">.</span><span class="n">id</span>
|
|
</span><span id="__span-0-220"><a id="__codelineno-0-220" name="__codelineno-0-220"></a> <span class="k">for</span> <span class="n">ms</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">club_members</span>
|
|
</span><span id="__span-0-221"><a id="__codelineno-0-221" name="__codelineno-0-221"></a> <span class="k">if</span> <span class="n">ms</span><span class="o">.</span><span class="n">can_be_edited_by</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">request_user</span><span class="p">)</span>
|
|
</span><span id="__span-0-222"><a id="__codelineno-0-222" name="__codelineno-0-222"></a> <span class="p">]</span>
|
|
</span><span id="__span-0-223"><a id="__codelineno-0-223" name="__codelineno-0-223"></a> <span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">(),</span>
|
|
</span><span id="__span-0-224"><a id="__codelineno-0-224" name="__codelineno-0-224"></a> <span class="n">label</span><span class="o">=</span><span class="n">_</span><span class="p">(</span><span class="s2">"Mark as old"</span><span class="p">),</span>
|
|
</span><span id="__span-0-225"><a id="__codelineno-0-225" name="__codelineno-0-225"></a> <span class="n">required</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
|
|
</span><span id="__span-0-226"><a id="__codelineno-0-226" name="__codelineno-0-226"></a> <span class="n">widget</span><span class="o">=</span><span class="n">forms</span><span class="o">.</span><span class="n">CheckboxSelectMultiple</span><span class="p">,</span>
|
|
</span><span id="__span-0-227"><a id="__codelineno-0-227" name="__codelineno-0-227"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-228"><a id="__codelineno-0-228" name="__codelineno-0-228"></a> <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">request_user</span><span class="o">.</span><span class="n">is_root</span><span class="p">:</span>
|
|
</span><span id="__span-0-229"><a id="__codelineno-0-229" name="__codelineno-0-229"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"start_date"</span><span class="p">)</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.ClubMemberForm.clean_users" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">clean_users</span><span class="p">()</span></code>
|
|
|
|
<a href="#club.views.ClubMemberForm.clean_users" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Check that the user is not trying to add an user already in the club.</p>
|
|
<p>Also check that the user is valid and has a valid subscription.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/forms.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-231">231</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-232">232</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-233">233</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-234">234</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-235">235</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-236">236</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-237">237</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-238">238</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-239">239</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-240">240</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-241">241</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-242">242</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-243">243</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-244">244</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-245">245</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-246">246</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-247">247</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-248">248</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-231"><a id="__codelineno-0-231" name="__codelineno-0-231"></a><span class="k">def</span> <span class="nf">clean_users</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
|
</span><span id="__span-0-232"><a id="__codelineno-0-232" name="__codelineno-0-232"></a><span class="w"> </span><span class="sd">"""Check that the user is not trying to add an user already in the club.</span>
|
|
</span><span id="__span-0-233"><a id="__codelineno-0-233" name="__codelineno-0-233"></a>
|
|
</span><span id="__span-0-234"><a id="__codelineno-0-234" name="__codelineno-0-234"></a><span class="sd"> Also check that the user is valid and has a valid subscription.</span>
|
|
</span><span id="__span-0-235"><a id="__codelineno-0-235" name="__codelineno-0-235"></a><span class="sd"> """</span>
|
|
</span><span id="__span-0-236"><a id="__codelineno-0-236" name="__codelineno-0-236"></a> <span class="n">cleaned_data</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">clean</span><span class="p">()</span>
|
|
</span><span id="__span-0-237"><a id="__codelineno-0-237" name="__codelineno-0-237"></a> <span class="n">users</span> <span class="o">=</span> <span class="p">[]</span>
|
|
</span><span id="__span-0-238"><a id="__codelineno-0-238" name="__codelineno-0-238"></a> <span class="k">for</span> <span class="n">user</span> <span class="ow">in</span> <span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"users"</span><span class="p">]:</span>
|
|
</span><span id="__span-0-239"><a id="__codelineno-0-239" name="__codelineno-0-239"></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">user</span><span class="o">.</span><span class="n">is_subscribed</span><span class="p">:</span>
|
|
</span><span id="__span-0-240"><a id="__codelineno-0-240" name="__codelineno-0-240"></a> <span class="k">raise</span> <span class="n">forms</span><span class="o">.</span><span class="n">ValidationError</span><span class="p">(</span>
|
|
</span><span id="__span-0-241"><a id="__codelineno-0-241" name="__codelineno-0-241"></a> <span class="n">_</span><span class="p">(</span><span class="s2">"User must be subscriber to take part to a club"</span><span class="p">),</span> <span class="n">code</span><span class="o">=</span><span class="s2">"invalid"</span>
|
|
</span><span id="__span-0-242"><a id="__codelineno-0-242" name="__codelineno-0-242"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-243"><a id="__codelineno-0-243" name="__codelineno-0-243"></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">club</span><span class="o">.</span><span class="n">get_membership_for</span><span class="p">(</span><span class="n">user</span><span class="p">):</span>
|
|
</span><span id="__span-0-244"><a id="__codelineno-0-244" name="__codelineno-0-244"></a> <span class="k">raise</span> <span class="n">forms</span><span class="o">.</span><span class="n">ValidationError</span><span class="p">(</span>
|
|
</span><span id="__span-0-245"><a id="__codelineno-0-245" name="__codelineno-0-245"></a> <span class="n">_</span><span class="p">(</span><span class="s2">"You can not add the same user twice"</span><span class="p">),</span> <span class="n">code</span><span class="o">=</span><span class="s2">"invalid"</span>
|
|
</span><span id="__span-0-246"><a id="__codelineno-0-246" name="__codelineno-0-246"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-247"><a id="__codelineno-0-247" name="__codelineno-0-247"></a> <span class="n">users</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">user</span><span class="p">)</span>
|
|
</span><span id="__span-0-248"><a id="__codelineno-0-248" name="__codelineno-0-248"></a> <span class="k">return</span> <span class="n">users</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.ClubMemberForm.clean" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">clean</span><span class="p">()</span></code>
|
|
|
|
<a href="#club.views.ClubMemberForm.clean" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Check user rights for adding an user.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/forms.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-250">250</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-251">251</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-252">252</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-253">253</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-254">254</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-255">255</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-256">256</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-257">257</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-258">258</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-259">259</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-260">260</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-261">261</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-262">262</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-263">263</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-264">264</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-265">265</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-266">266</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-267">267</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-268">268</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-269">269</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-270">270</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-271">271</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-272">272</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-273">273</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-274">274</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-275">275</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-276">276</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-250"><a id="__codelineno-0-250" name="__codelineno-0-250"></a><span class="k">def</span> <span class="nf">clean</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
|
</span><span id="__span-0-251"><a id="__codelineno-0-251" name="__codelineno-0-251"></a><span class="w"> </span><span class="sd">"""Check user rights for adding an user."""</span>
|
|
</span><span id="__span-0-252"><a id="__codelineno-0-252" name="__codelineno-0-252"></a> <span class="n">cleaned_data</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">clean</span><span class="p">()</span>
|
|
</span><span id="__span-0-253"><a id="__codelineno-0-253" name="__codelineno-0-253"></a>
|
|
</span><span id="__span-0-254"><a id="__codelineno-0-254" name="__codelineno-0-254"></a> <span class="k">if</span> <span class="s2">"start_date"</span> <span class="ow">in</span> <span class="n">cleaned_data</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"start_date"</span><span class="p">]:</span>
|
|
</span><span id="__span-0-255"><a id="__codelineno-0-255" name="__codelineno-0-255"></a> <span class="c1"># Drop start_date if allowed to edition but not specified</span>
|
|
</span><span id="__span-0-256"><a id="__codelineno-0-256" name="__codelineno-0-256"></a> <span class="n">cleaned_data</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"start_date"</span><span class="p">)</span>
|
|
</span><span id="__span-0-257"><a id="__codelineno-0-257" name="__codelineno-0-257"></a>
|
|
</span><span id="__span-0-258"><a id="__codelineno-0-258" name="__codelineno-0-258"></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">cleaned_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"users"</span><span class="p">):</span>
|
|
</span><span id="__span-0-259"><a id="__codelineno-0-259" name="__codelineno-0-259"></a> <span class="c1"># No user to add equals no check needed</span>
|
|
</span><span id="__span-0-260"><a id="__codelineno-0-260" name="__codelineno-0-260"></a> <span class="k">return</span> <span class="n">cleaned_data</span>
|
|
</span><span id="__span-0-261"><a id="__codelineno-0-261" name="__codelineno-0-261"></a>
|
|
</span><span id="__span-0-262"><a id="__codelineno-0-262" name="__codelineno-0-262"></a> <span class="k">if</span> <span class="n">cleaned_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"role"</span><span class="p">,</span> <span class="s2">""</span><span class="p">)</span> <span class="o">==</span> <span class="s2">""</span><span class="p">:</span>
|
|
</span><span id="__span-0-263"><a id="__codelineno-0-263" name="__codelineno-0-263"></a> <span class="c1"># Role is required if users exists</span>
|
|
</span><span id="__span-0-264"><a id="__codelineno-0-264" name="__codelineno-0-264"></a> <span class="bp">self</span><span class="o">.</span><span class="n">add_error</span><span class="p">(</span><span class="s2">"role"</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s2">"You should specify a role"</span><span class="p">))</span>
|
|
</span><span id="__span-0-265"><a id="__codelineno-0-265" name="__codelineno-0-265"></a> <span class="k">return</span> <span class="n">cleaned_data</span>
|
|
</span><span id="__span-0-266"><a id="__codelineno-0-266" name="__codelineno-0-266"></a>
|
|
</span><span id="__span-0-267"><a id="__codelineno-0-267" name="__codelineno-0-267"></a> <span class="n">request_user</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">request_user</span>
|
|
</span><span id="__span-0-268"><a id="__codelineno-0-268" name="__codelineno-0-268"></a> <span class="n">membership</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">request_user_membership</span>
|
|
</span><span id="__span-0-269"><a id="__codelineno-0-269" name="__codelineno-0-269"></a> <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span>
|
|
</span><span id="__span-0-270"><a id="__codelineno-0-270" name="__codelineno-0-270"></a> <span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"role"</span><span class="p">]</span> <span class="o"><=</span> <span class="n">settings</span><span class="o">.</span><span class="n">SITH_MAXIMUM_FREE_ROLE</span>
|
|
</span><span id="__span-0-271"><a id="__codelineno-0-271" name="__codelineno-0-271"></a> <span class="ow">or</span> <span class="p">(</span><span class="n">membership</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">membership</span><span class="o">.</span><span class="n">role</span> <span class="o">>=</span> <span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"role"</span><span class="p">])</span>
|
|
</span><span id="__span-0-272"><a id="__codelineno-0-272" name="__codelineno-0-272"></a> <span class="ow">or</span> <span class="n">request_user</span><span class="o">.</span><span class="n">is_board_member</span>
|
|
</span><span id="__span-0-273"><a id="__codelineno-0-273" name="__codelineno-0-273"></a> <span class="ow">or</span> <span class="n">request_user</span><span class="o">.</span><span class="n">is_root</span>
|
|
</span><span id="__span-0-274"><a id="__codelineno-0-274" name="__codelineno-0-274"></a> <span class="p">):</span>
|
|
</span><span id="__span-0-275"><a id="__codelineno-0-275" name="__codelineno-0-275"></a> <span class="k">raise</span> <span class="n">forms</span><span class="o">.</span><span class="n">ValidationError</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s2">"You do not have the permission to do that"</span><span class="p">))</span>
|
|
</span><span id="__span-0-276"><a id="__codelineno-0-276" name="__codelineno-0-276"></a> <span class="k">return</span> <span class="n">cleaned_data</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.MailingForm" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">MailingForm</span><span class="p">(</span><span class="n">club_id</span><span class="p">,</span> <span class="n">user_id</span><span class="p">,</span> <span class="n">mailings</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.MailingForm" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>Form</code></p>
|
|
|
|
|
|
<p>Form handling mailing lists right.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/forms.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-61"> 61</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-62"> 62</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-63"> 63</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-64"> 64</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-65"> 65</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-66"> 66</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-67"> 67</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-68"> 68</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-69"> 69</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-70"> 70</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-71"> 71</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-72"> 72</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-73"> 73</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-74"> 74</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-75"> 75</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-76"> 76</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-77"> 77</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-78"> 78</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-79"> 79</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-80"> 80</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-81"> 81</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-82"> 82</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-83"> 83</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-84"> 84</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-85"> 85</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-86"> 86</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-87"> 87</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-88"> 88</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-89"> 89</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-90"> 90</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-91"> 91</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-92"> 92</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-93"> 93</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-94"> 94</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-95"> 95</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-96"> 96</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-97"> 97</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-98"> 98</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-99"> 99</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-100">100</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-101">101</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-102">102</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-103">103</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-104">104</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-61"><a id="__codelineno-0-61" name="__codelineno-0-61"></a><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">club_id</span><span class="p">,</span> <span class="n">user_id</span><span class="p">,</span> <span class="n">mailings</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
|
</span><span id="__span-0-62"><a id="__codelineno-0-62" name="__codelineno-0-62"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
|
</span><span id="__span-0-63"><a id="__codelineno-0-63" name="__codelineno-0-63"></a>
|
|
</span><span id="__span-0-64"><a id="__codelineno-0-64" name="__codelineno-0-64"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"action"</span><span class="p">]</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">TypedChoiceField</span><span class="p">(</span>
|
|
</span><span id="__span-0-65"><a id="__codelineno-0-65" name="__codelineno-0-65"></a> <span class="n">choices</span><span class="o">=</span><span class="p">(</span>
|
|
</span><span id="__span-0-66"><a id="__codelineno-0-66" name="__codelineno-0-66"></a> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ACTION_NEW_MAILING</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s2">"New Mailing"</span><span class="p">)),</span>
|
|
</span><span id="__span-0-67"><a id="__codelineno-0-67" name="__codelineno-0-67"></a> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ACTION_NEW_SUBSCRIPTION</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s2">"Subscribe"</span><span class="p">)),</span>
|
|
</span><span id="__span-0-68"><a id="__codelineno-0-68" name="__codelineno-0-68"></a> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ACTION_REMOVE_SUBSCRIPTION</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s2">"Remove"</span><span class="p">)),</span>
|
|
</span><span id="__span-0-69"><a id="__codelineno-0-69" name="__codelineno-0-69"></a> <span class="p">),</span>
|
|
</span><span id="__span-0-70"><a id="__codelineno-0-70" name="__codelineno-0-70"></a> <span class="n">coerce</span><span class="o">=</span><span class="nb">int</span><span class="p">,</span>
|
|
</span><span id="__span-0-71"><a id="__codelineno-0-71" name="__codelineno-0-71"></a> <span class="n">label</span><span class="o">=</span><span class="n">_</span><span class="p">(</span><span class="s2">"Action"</span><span class="p">),</span>
|
|
</span><span id="__span-0-72"><a id="__codelineno-0-72" name="__codelineno-0-72"></a> <span class="n">initial</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
|
|
</span><span id="__span-0-73"><a id="__codelineno-0-73" name="__codelineno-0-73"></a> <span class="n">required</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
|
|
</span><span id="__span-0-74"><a id="__codelineno-0-74" name="__codelineno-0-74"></a> <span class="n">widget</span><span class="o">=</span><span class="n">forms</span><span class="o">.</span><span class="n">HiddenInput</span><span class="p">(),</span>
|
|
</span><span id="__span-0-75"><a id="__codelineno-0-75" name="__codelineno-0-75"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-76"><a id="__codelineno-0-76" name="__codelineno-0-76"></a>
|
|
</span><span id="__span-0-77"><a id="__codelineno-0-77" name="__codelineno-0-77"></a> <span class="c1"># Generate bulk removal forms, they are never required</span>
|
|
</span><span id="__span-0-78"><a id="__codelineno-0-78" name="__codelineno-0-78"></a> <span class="k">for</span> <span class="n">mailing</span> <span class="ow">in</span> <span class="n">mailings</span><span class="p">:</span>
|
|
</span><span id="__span-0-79"><a id="__codelineno-0-79" name="__codelineno-0-79"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"removal_"</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">mailing</span><span class="o">.</span><span class="n">id</span><span class="p">)]</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">ModelMultipleChoiceField</span><span class="p">(</span>
|
|
</span><span id="__span-0-80"><a id="__codelineno-0-80" name="__codelineno-0-80"></a> <span class="n">mailing</span><span class="o">.</span><span class="n">subscriptions</span><span class="o">.</span><span class="n">all</span><span class="p">(),</span>
|
|
</span><span id="__span-0-81"><a id="__codelineno-0-81" name="__codelineno-0-81"></a> <span class="n">label</span><span class="o">=</span><span class="n">_</span><span class="p">(</span><span class="s2">"Remove"</span><span class="p">),</span>
|
|
</span><span id="__span-0-82"><a id="__codelineno-0-82" name="__codelineno-0-82"></a> <span class="n">required</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
|
|
</span><span id="__span-0-83"><a id="__codelineno-0-83" name="__codelineno-0-83"></a> <span class="n">widget</span><span class="o">=</span><span class="n">forms</span><span class="o">.</span><span class="n">CheckboxSelectMultiple</span><span class="p">,</span>
|
|
</span><span id="__span-0-84"><a id="__codelineno-0-84" name="__codelineno-0-84"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-85"><a id="__codelineno-0-85" name="__codelineno-0-85"></a>
|
|
</span><span id="__span-0-86"><a id="__codelineno-0-86" name="__codelineno-0-86"></a> <span class="c1"># Include fields for handling mailing creation</span>
|
|
</span><span id="__span-0-87"><a id="__codelineno-0-87" name="__codelineno-0-87"></a> <span class="n">mailing_fields</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"email"</span><span class="p">,)</span>
|
|
</span><span id="__span-0-88"><a id="__codelineno-0-88" name="__codelineno-0-88"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">forms</span><span class="o">.</span><span class="n">fields_for_model</span><span class="p">(</span><span class="n">Mailing</span><span class="p">,</span> <span class="n">fields</span><span class="o">=</span><span class="n">mailing_fields</span><span class="p">))</span>
|
|
</span><span id="__span-0-89"><a id="__codelineno-0-89" name="__codelineno-0-89"></a> <span class="k">for</span> <span class="n">field</span> <span class="ow">in</span> <span class="n">mailing_fields</span><span class="p">:</span>
|
|
</span><span id="__span-0-90"><a id="__codelineno-0-90" name="__codelineno-0-90"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"mailing_"</span> <span class="o">+</span> <span class="n">field</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">field</span><span class="p">)</span>
|
|
</span><span id="__span-0-91"><a id="__codelineno-0-91" name="__codelineno-0-91"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"mailing_"</span> <span class="o">+</span> <span class="n">field</span><span class="p">]</span><span class="o">.</span><span class="n">required</span> <span class="o">=</span> <span class="kc">False</span>
|
|
</span><span id="__span-0-92"><a id="__codelineno-0-92" name="__codelineno-0-92"></a>
|
|
</span><span id="__span-0-93"><a id="__codelineno-0-93" name="__codelineno-0-93"></a> <span class="c1"># Include fields for handling subscription creation</span>
|
|
</span><span id="__span-0-94"><a id="__codelineno-0-94" name="__codelineno-0-94"></a> <span class="n">subscription_fields</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"mailing"</span><span class="p">,</span> <span class="s2">"email"</span><span class="p">)</span>
|
|
</span><span id="__span-0-95"><a id="__codelineno-0-95" name="__codelineno-0-95"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="o">.</span><span class="n">update</span><span class="p">(</span>
|
|
</span><span id="__span-0-96"><a id="__codelineno-0-96" name="__codelineno-0-96"></a> <span class="n">forms</span><span class="o">.</span><span class="n">fields_for_model</span><span class="p">(</span><span class="n">MailingSubscription</span><span class="p">,</span> <span class="n">fields</span><span class="o">=</span><span class="n">subscription_fields</span><span class="p">)</span>
|
|
</span><span id="__span-0-97"><a id="__codelineno-0-97" name="__codelineno-0-97"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-98"><a id="__codelineno-0-98" name="__codelineno-0-98"></a> <span class="k">for</span> <span class="n">field</span> <span class="ow">in</span> <span class="n">subscription_fields</span><span class="p">:</span>
|
|
</span><span id="__span-0-99"><a id="__codelineno-0-99" name="__codelineno-0-99"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"subscription_"</span> <span class="o">+</span> <span class="n">field</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">field</span><span class="p">)</span>
|
|
</span><span id="__span-0-100"><a id="__codelineno-0-100" name="__codelineno-0-100"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"subscription_"</span> <span class="o">+</span> <span class="n">field</span><span class="p">]</span><span class="o">.</span><span class="n">required</span> <span class="o">=</span> <span class="kc">False</span>
|
|
</span><span id="__span-0-101"><a id="__codelineno-0-101" name="__codelineno-0-101"></a>
|
|
</span><span id="__span-0-102"><a id="__codelineno-0-102" name="__codelineno-0-102"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"subscription_mailing"</span><span class="p">]</span><span class="o">.</span><span class="n">queryset</span> <span class="o">=</span> <span class="n">Mailing</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
|
|
</span><span id="__span-0-103"><a id="__codelineno-0-103" name="__codelineno-0-103"></a> <span class="n">club__id</span><span class="o">=</span><span class="n">club_id</span><span class="p">,</span> <span class="n">is_moderated</span><span class="o">=</span><span class="kc">True</span>
|
|
</span><span id="__span-0-104"><a id="__codelineno-0-104" name="__codelineno-0-104"></a> <span class="p">)</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.MailingForm.check_required" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">check_required</span><span class="p">(</span><span class="n">cleaned_data</span><span class="p">,</span> <span class="n">field</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.MailingForm.check_required" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>If the given field doesn't exist or has no value, add a required error on it.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/forms.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-106">106</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-107">107</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-108">108</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-109">109</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-106"><a id="__codelineno-0-106" name="__codelineno-0-106"></a><span class="k">def</span> <span class="nf">check_required</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cleaned_data</span><span class="p">,</span> <span class="n">field</span><span class="p">):</span>
|
|
</span><span id="__span-0-107"><a id="__codelineno-0-107" name="__codelineno-0-107"></a><span class="w"> </span><span class="sd">"""If the given field doesn't exist or has no value, add a required error on it."""</span>
|
|
</span><span id="__span-0-108"><a id="__codelineno-0-108" name="__codelineno-0-108"></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">cleaned_data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">field</span><span class="p">,</span> <span class="kc">None</span><span class="p">):</span>
|
|
</span><span id="__span-0-109"><a id="__codelineno-0-109" name="__codelineno-0-109"></a> <span class="bp">self</span><span class="o">.</span><span class="n">add_error</span><span class="p">(</span><span class="n">field</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s2">"This field is required"</span><span class="p">))</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.MailingForm.clean_subscription_users" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">clean_subscription_users</span><span class="p">()</span></code>
|
|
|
|
<a href="#club.views.MailingForm.clean_subscription_users" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Convert given users into real users and check their validity.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/forms.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-111">111</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-112">112</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-113">113</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-114">114</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-115">115</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-116">116</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-117">117</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-118">118</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-119">119</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-120">120</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-121">121</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-122">122</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-111"><a id="__codelineno-0-111" name="__codelineno-0-111"></a><span class="k">def</span> <span class="nf">clean_subscription_users</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
|
</span><span id="__span-0-112"><a id="__codelineno-0-112" name="__codelineno-0-112"></a><span class="w"> </span><span class="sd">"""Convert given users into real users and check their validity."""</span>
|
|
</span><span id="__span-0-113"><a id="__codelineno-0-113" name="__codelineno-0-113"></a> <span class="n">cleaned_data</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">clean</span><span class="p">()</span>
|
|
</span><span id="__span-0-114"><a id="__codelineno-0-114" name="__codelineno-0-114"></a> <span class="n">users</span> <span class="o">=</span> <span class="p">[]</span>
|
|
</span><span id="__span-0-115"><a id="__codelineno-0-115" name="__codelineno-0-115"></a> <span class="k">for</span> <span class="n">user</span> <span class="ow">in</span> <span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"subscription_users"</span><span class="p">]:</span>
|
|
</span><span id="__span-0-116"><a id="__codelineno-0-116" name="__codelineno-0-116"></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">user</span><span class="o">.</span><span class="n">email</span><span class="p">:</span>
|
|
</span><span id="__span-0-117"><a id="__codelineno-0-117" name="__codelineno-0-117"></a> <span class="k">raise</span> <span class="n">forms</span><span class="o">.</span><span class="n">ValidationError</span><span class="p">(</span>
|
|
</span><span id="__span-0-118"><a id="__codelineno-0-118" name="__codelineno-0-118"></a> <span class="n">_</span><span class="p">(</span><span class="s2">"One of the selected users doesn't have an email address"</span><span class="p">),</span>
|
|
</span><span id="__span-0-119"><a id="__codelineno-0-119" name="__codelineno-0-119"></a> <span class="n">code</span><span class="o">=</span><span class="s2">"invalid"</span><span class="p">,</span>
|
|
</span><span id="__span-0-120"><a id="__codelineno-0-120" name="__codelineno-0-120"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-121"><a id="__codelineno-0-121" name="__codelineno-0-121"></a> <span class="n">users</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">user</span><span class="p">)</span>
|
|
</span><span id="__span-0-122"><a id="__codelineno-0-122" name="__codelineno-0-122"></a> <span class="k">return</span> <span class="n">users</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.SellingsForm" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">SellingsForm</span><span class="p">(</span><span class="n">club</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.SellingsForm" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>Form</code></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/forms.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-159">159</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-160">160</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-161">161</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-162">162</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-163">163</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-164">164</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-165">165</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-166">166</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-167">167</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-168">168</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-169">169</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-170">170</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-159"><a id="__codelineno-0-159" name="__codelineno-0-159"></a><span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">club</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
|
</span><span id="__span-0-160"><a id="__codelineno-0-160" name="__codelineno-0-160"></a> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
|
</span><span id="__span-0-161"><a id="__codelineno-0-161" name="__codelineno-0-161"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"products"</span><span class="p">]</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">ModelMultipleChoiceField</span><span class="p">(</span>
|
|
</span><span id="__span-0-162"><a id="__codelineno-0-162" name="__codelineno-0-162"></a> <span class="n">club</span><span class="o">.</span><span class="n">products</span><span class="o">.</span><span class="n">order_by</span><span class="p">(</span><span class="s2">"name"</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">archived</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">(),</span>
|
|
</span><span id="__span-0-163"><a id="__codelineno-0-163" name="__codelineno-0-163"></a> <span class="n">label</span><span class="o">=</span><span class="n">_</span><span class="p">(</span><span class="s2">"Products"</span><span class="p">),</span>
|
|
</span><span id="__span-0-164"><a id="__codelineno-0-164" name="__codelineno-0-164"></a> <span class="n">required</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
|
|
</span><span id="__span-0-165"><a id="__codelineno-0-165" name="__codelineno-0-165"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-166"><a id="__codelineno-0-166" name="__codelineno-0-166"></a> <span class="bp">self</span><span class="o">.</span><span class="n">fields</span><span class="p">[</span><span class="s2">"archived_products"</span><span class="p">]</span> <span class="o">=</span> <span class="n">forms</span><span class="o">.</span><span class="n">ModelMultipleChoiceField</span><span class="p">(</span>
|
|
</span><span id="__span-0-167"><a id="__codelineno-0-167" name="__codelineno-0-167"></a> <span class="n">club</span><span class="o">.</span><span class="n">products</span><span class="o">.</span><span class="n">order_by</span><span class="p">(</span><span class="s2">"name"</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">archived</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">(),</span>
|
|
</span><span id="__span-0-168"><a id="__codelineno-0-168" name="__codelineno-0-168"></a> <span class="n">label</span><span class="o">=</span><span class="n">_</span><span class="p">(</span><span class="s2">"Archived products"</span><span class="p">),</span>
|
|
</span><span id="__span-0-169"><a id="__codelineno-0-169" name="__codelineno-0-169"></a> <span class="n">required</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
|
|
</span><span id="__span-0-170"><a id="__codelineno-0-170" name="__codelineno-0-170"></a> <span class="p">)</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.Club" class="doc doc-heading">
|
|
<code>Club</code>
|
|
|
|
|
|
<a href="#club.views.Club" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>Model</code></p>
|
|
|
|
|
|
<p>The Club class, made as a tree to allow nice tidy organization.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.Club.check_loop" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">check_loop</span><span class="p">()</span></code>
|
|
|
|
<a href="#club.views.Club.check_loop" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Raise a validation error when a loop is found within the parent list.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/models.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-144">144</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-145">145</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-146">146</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-147">147</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-148">148</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-149">149</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-150">150</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-151">151</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-152">152</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-144"><a id="__codelineno-0-144" name="__codelineno-0-144"></a><span class="k">def</span> <span class="nf">check_loop</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
|
</span><span id="__span-0-145"><a id="__codelineno-0-145" name="__codelineno-0-145"></a><span class="w"> </span><span class="sd">"""Raise a validation error when a loop is found within the parent list."""</span>
|
|
</span><span id="__span-0-146"><a id="__codelineno-0-146" name="__codelineno-0-146"></a> <span class="n">objs</span> <span class="o">=</span> <span class="p">[]</span>
|
|
</span><span id="__span-0-147"><a id="__codelineno-0-147" name="__codelineno-0-147"></a> <span class="n">cur</span> <span class="o">=</span> <span class="bp">self</span>
|
|
</span><span id="__span-0-148"><a id="__codelineno-0-148" name="__codelineno-0-148"></a> <span class="k">while</span> <span class="n">cur</span><span class="o">.</span><span class="n">parent</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
|
|
</span><span id="__span-0-149"><a id="__codelineno-0-149" name="__codelineno-0-149"></a> <span class="k">if</span> <span class="n">cur</span> <span class="ow">in</span> <span class="n">objs</span><span class="p">:</span>
|
|
</span><span id="__span-0-150"><a id="__codelineno-0-150" name="__codelineno-0-150"></a> <span class="k">raise</span> <span class="n">ValidationError</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s2">"You can not make loops in clubs"</span><span class="p">))</span>
|
|
</span><span id="__span-0-151"><a id="__codelineno-0-151" name="__codelineno-0-151"></a> <span class="n">objs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cur</span><span class="p">)</span>
|
|
</span><span id="__span-0-152"><a id="__codelineno-0-152" name="__codelineno-0-152"></a> <span class="n">cur</span> <span class="o">=</span> <span class="n">cur</span><span class="o">.</span><span class="n">parent</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.Club.is_owned_by" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">is_owned_by</span><span class="p">(</span><span class="n">user</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.Club.is_owned_by" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Method to see if that object can be super edited by the given user.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/models.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-226">226</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-227">227</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-228">228</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-229">229</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-230">230</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-226"><a id="__codelineno-0-226" name="__codelineno-0-226"></a><span class="k">def</span> <span class="nf">is_owned_by</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user</span><span class="p">):</span>
|
|
</span><span id="__span-0-227"><a id="__codelineno-0-227" name="__codelineno-0-227"></a><span class="w"> </span><span class="sd">"""Method to see if that object can be super edited by the given user."""</span>
|
|
</span><span id="__span-0-228"><a id="__codelineno-0-228" name="__codelineno-0-228"></a> <span class="k">if</span> <span class="n">user</span><span class="o">.</span><span class="n">is_anonymous</span><span class="p">:</span>
|
|
</span><span id="__span-0-229"><a id="__codelineno-0-229" name="__codelineno-0-229"></a> <span class="k">return</span> <span class="kc">False</span>
|
|
</span><span id="__span-0-230"><a id="__codelineno-0-230" name="__codelineno-0-230"></a> <span class="k">return</span> <span class="n">user</span><span class="o">.</span><span class="n">is_board_member</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.Club.can_be_edited_by" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">can_be_edited_by</span><span class="p">(</span><span class="n">user</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.Club.can_be_edited_by" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Method to see if that object can be edited by the given user.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/models.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-235">235</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-236">236</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-237">237</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-235"><a id="__codelineno-0-235" name="__codelineno-0-235"></a><span class="k">def</span> <span class="nf">can_be_edited_by</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user</span><span class="p">):</span>
|
|
</span><span id="__span-0-236"><a id="__codelineno-0-236" name="__codelineno-0-236"></a><span class="w"> </span><span class="sd">"""Method to see if that object can be edited by the given user."""</span>
|
|
</span><span id="__span-0-237"><a id="__codelineno-0-237" name="__codelineno-0-237"></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">has_rights_in_club</span><span class="p">(</span><span class="n">user</span><span class="p">)</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.Club.can_be_viewed_by" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">can_be_viewed_by</span><span class="p">(</span><span class="n">user</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.Club.can_be_viewed_by" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Method to see if that object can be seen by the given user.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/models.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-239">239</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-240">240</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-241">241</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-242">242</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-243">243</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-244">244</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-239"><a id="__codelineno-0-239" name="__codelineno-0-239"></a><span class="k">def</span> <span class="nf">can_be_viewed_by</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user</span><span class="p">):</span>
|
|
</span><span id="__span-0-240"><a id="__codelineno-0-240" name="__codelineno-0-240"></a><span class="w"> </span><span class="sd">"""Method to see if that object can be seen by the given user."""</span>
|
|
</span><span id="__span-0-241"><a id="__codelineno-0-241" name="__codelineno-0-241"></a> <span class="n">sub</span> <span class="o">=</span> <span class="n">User</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">pk</span><span class="o">=</span><span class="n">user</span><span class="o">.</span><span class="n">pk</span><span class="p">)</span><span class="o">.</span><span class="n">first</span><span class="p">()</span>
|
|
</span><span id="__span-0-242"><a id="__codelineno-0-242" name="__codelineno-0-242"></a> <span class="k">if</span> <span class="n">sub</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
|
</span><span id="__span-0-243"><a id="__codelineno-0-243" name="__codelineno-0-243"></a> <span class="k">return</span> <span class="kc">False</span>
|
|
</span><span id="__span-0-244"><a id="__codelineno-0-244" name="__codelineno-0-244"></a> <span class="k">return</span> <span class="n">sub</span><span class="o">.</span><span class="n">was_subscribed</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.Club.get_membership_for" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">get_membership_for</span><span class="p">(</span><span class="n">user</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.Club.get_membership_for" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Return the current membership the given user.</p>
|
|
|
|
|
|
<details class="note" open>
|
|
<summary>Note</summary>
|
|
<p>The result is cached.</p>
|
|
</details>
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/models.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-246">246</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-247">247</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-248">248</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-249">249</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-250">250</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-251">251</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-252">252</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-253">253</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-254">254</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-255">255</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-256">256</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-257">257</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-258">258</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-259">259</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-260">260</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-261">261</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-262">262</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-263">263</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-246"><a id="__codelineno-0-246" name="__codelineno-0-246"></a><span class="k">def</span> <span class="nf">get_membership_for</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user</span><span class="p">:</span> <span class="n">User</span><span class="p">)</span> <span class="o">-></span> <span class="n">Membership</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
|
|
</span><span id="__span-0-247"><a id="__codelineno-0-247" name="__codelineno-0-247"></a><span class="w"> </span><span class="sd">"""Return the current membership the given user.</span>
|
|
</span><span id="__span-0-248"><a id="__codelineno-0-248" name="__codelineno-0-248"></a>
|
|
</span><span id="__span-0-249"><a id="__codelineno-0-249" name="__codelineno-0-249"></a><span class="sd"> Note:</span>
|
|
</span><span id="__span-0-250"><a id="__codelineno-0-250" name="__codelineno-0-250"></a><span class="sd"> The result is cached.</span>
|
|
</span><span id="__span-0-251"><a id="__codelineno-0-251" name="__codelineno-0-251"></a><span class="sd"> """</span>
|
|
</span><span id="__span-0-252"><a id="__codelineno-0-252" name="__codelineno-0-252"></a> <span class="k">if</span> <span class="n">user</span><span class="o">.</span><span class="n">is_anonymous</span><span class="p">:</span>
|
|
</span><span id="__span-0-253"><a id="__codelineno-0-253" name="__codelineno-0-253"></a> <span class="k">return</span> <span class="kc">None</span>
|
|
</span><span id="__span-0-254"><a id="__codelineno-0-254" name="__codelineno-0-254"></a> <span class="n">membership</span> <span class="o">=</span> <span class="n">cache</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="sa">f</span><span class="s2">"membership_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">_</span><span class="si">{</span><span class="n">user</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
|
</span><span id="__span-0-255"><a id="__codelineno-0-255" name="__codelineno-0-255"></a> <span class="k">if</span> <span class="n">membership</span> <span class="o">==</span> <span class="s2">"not_member"</span><span class="p">:</span>
|
|
</span><span id="__span-0-256"><a id="__codelineno-0-256" name="__codelineno-0-256"></a> <span class="k">return</span> <span class="kc">None</span>
|
|
</span><span id="__span-0-257"><a id="__codelineno-0-257" name="__codelineno-0-257"></a> <span class="k">if</span> <span class="n">membership</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
|
</span><span id="__span-0-258"><a id="__codelineno-0-258" name="__codelineno-0-258"></a> <span class="n">membership</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">members</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">user</span><span class="o">=</span><span class="n">user</span><span class="p">,</span> <span class="n">end_date</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span><span class="o">.</span><span class="n">first</span><span class="p">()</span>
|
|
</span><span id="__span-0-259"><a id="__codelineno-0-259" name="__codelineno-0-259"></a> <span class="k">if</span> <span class="n">membership</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
|
</span><span id="__span-0-260"><a id="__codelineno-0-260" name="__codelineno-0-260"></a> <span class="n">cache</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="sa">f</span><span class="s2">"membership_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">_</span><span class="si">{</span><span class="n">user</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> <span class="s2">"not_member"</span><span class="p">)</span>
|
|
</span><span id="__span-0-261"><a id="__codelineno-0-261" name="__codelineno-0-261"></a> <span class="k">else</span><span class="p">:</span>
|
|
</span><span id="__span-0-262"><a id="__codelineno-0-262" name="__codelineno-0-262"></a> <span class="n">cache</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="sa">f</span><span class="s2">"membership_</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">_</span><span class="si">{</span><span class="n">user</span><span class="o">.</span><span class="n">id</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> <span class="n">membership</span><span class="p">)</span>
|
|
</span><span id="__span-0-263"><a id="__codelineno-0-263" name="__codelineno-0-263"></a> <span class="k">return</span> <span class="n">membership</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.Mailing" class="doc doc-heading">
|
|
<code>Mailing</code>
|
|
|
|
|
|
<a href="#club.views.Mailing" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>Model</code></p>
|
|
|
|
|
|
<p>A Mailing list for a club.</p>
|
|
|
|
|
|
<details class="warning" open>
|
|
<summary>Warning</summary>
|
|
<p>Remember that mailing lists should be validated by UTBM.</p>
|
|
</details>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.MailingSubscription" class="doc doc-heading">
|
|
<code>MailingSubscription</code>
|
|
|
|
|
|
<a href="#club.views.MailingSubscription" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>Model</code></p>
|
|
|
|
|
|
<p>Link between user and mailing list.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.Membership" class="doc doc-heading">
|
|
<code>Membership</code>
|
|
|
|
|
|
<a href="#club.views.Membership" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>Model</code></p>
|
|
|
|
|
|
<p>The Membership class makes the connection between User and Clubs.</p>
|
|
|
|
|
|
<details class="both-users-and-clubs-can-have-many-membership-objects" open>
|
|
<summary>Both Users and Clubs can have many Membership objects</summary>
|
|
<ul>
|
|
<li>a user can be a member of many clubs at a time</li>
|
|
<li>a club can have many members at a time too</li>
|
|
</ul>
|
|
</details> <p>A User is currently member of all the Clubs where its Membership has an end_date set to null/None.
|
|
Otherwise, it's a past membership kept because it can be very useful to see who was in which Club in the past.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.Membership.is_owned_by" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">is_owned_by</span><span class="p">(</span><span class="n">user</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.Membership.is_owned_by" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Method to see if that object can be super edited by the given user.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/models.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-381">381</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-382">382</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-383">383</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-384">384</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-385">385</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-381"><a id="__codelineno-0-381" name="__codelineno-0-381"></a><span class="k">def</span> <span class="nf">is_owned_by</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user</span><span class="p">):</span>
|
|
</span><span id="__span-0-382"><a id="__codelineno-0-382" name="__codelineno-0-382"></a><span class="w"> </span><span class="sd">"""Method to see if that object can be super edited by the given user."""</span>
|
|
</span><span id="__span-0-383"><a id="__codelineno-0-383" name="__codelineno-0-383"></a> <span class="k">if</span> <span class="n">user</span><span class="o">.</span><span class="n">is_anonymous</span><span class="p">:</span>
|
|
</span><span id="__span-0-384"><a id="__codelineno-0-384" name="__codelineno-0-384"></a> <span class="k">return</span> <span class="kc">False</span>
|
|
</span><span id="__span-0-385"><a id="__codelineno-0-385" name="__codelineno-0-385"></a> <span class="k">return</span> <span class="n">user</span><span class="o">.</span><span class="n">is_board_member</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.Membership.can_be_edited_by" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">can_be_edited_by</span><span class="p">(</span><span class="n">user</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.Membership.can_be_edited_by" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Check if that object can be edited by the given user.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/models.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-387">387</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-388">388</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-389">389</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-390">390</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-391">391</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-392">392</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-387"><a id="__codelineno-0-387" name="__codelineno-0-387"></a><span class="k">def</span> <span class="nf">can_be_edited_by</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user</span><span class="p">:</span> <span class="n">User</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span>
|
|
</span><span id="__span-0-388"><a id="__codelineno-0-388" name="__codelineno-0-388"></a><span class="w"> </span><span class="sd">"""Check if that object can be edited by the given user."""</span>
|
|
</span><span id="__span-0-389"><a id="__codelineno-0-389" name="__codelineno-0-389"></a> <span class="k">if</span> <span class="n">user</span><span class="o">.</span><span class="n">is_root</span> <span class="ow">or</span> <span class="n">user</span><span class="o">.</span><span class="n">is_board_member</span><span class="p">:</span>
|
|
</span><span id="__span-0-390"><a id="__codelineno-0-390" name="__codelineno-0-390"></a> <span class="k">return</span> <span class="kc">True</span>
|
|
</span><span id="__span-0-391"><a id="__codelineno-0-391" name="__codelineno-0-391"></a> <span class="n">membership</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">club</span><span class="o">.</span><span class="n">get_membership_for</span><span class="p">(</span><span class="n">user</span><span class="p">)</span>
|
|
</span><span id="__span-0-392"><a id="__codelineno-0-392" name="__codelineno-0-392"></a> <span class="k">return</span> <span class="n">membership</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">membership</span><span class="o">.</span><span class="n">role</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">role</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubTabsMixin" class="doc doc-heading">
|
|
<code>ClubTabsMixin</code>
|
|
|
|
|
|
<a href="#club.views.ClubTabsMixin" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>TabedViewMixin</code></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubListView" class="doc doc-heading">
|
|
<code>ClubListView</code>
|
|
|
|
|
|
<a href="#club.views.ClubListView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ListView</code></p>
|
|
|
|
|
|
<p>List the Clubs.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubView" class="doc doc-heading">
|
|
<code>ClubView</code>
|
|
|
|
|
|
<a href="#club.views.ClubView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>DetailView</code></p>
|
|
|
|
|
|
<p>Front page of a Club.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubRevView" class="doc doc-heading">
|
|
<code>ClubRevView</code>
|
|
|
|
|
|
<a href="#club.views.ClubRevView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubView</code></p>
|
|
|
|
|
|
<p>Display a specific page revision.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubPageEditView" class="doc doc-heading">
|
|
<code>ClubPageEditView</code>
|
|
|
|
|
|
<a href="#club.views.ClubPageEditView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>PageEditViewBase</code></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubPageHistView" class="doc doc-heading">
|
|
<code>ClubPageHistView</code>
|
|
|
|
|
|
<a href="#club.views.ClubPageHistView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>CanViewMixin</code>, <code>DetailView</code></p>
|
|
|
|
|
|
<p>Modification hostory of the page.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubToolsView" class="doc doc-heading">
|
|
<code>ClubToolsView</code>
|
|
|
|
|
|
<a href="#club.views.ClubToolsView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>CanEditMixin</code>, <code>DetailView</code></p>
|
|
|
|
|
|
<p>Tools page of a Club.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubMembersView" class="doc doc-heading">
|
|
<code>ClubMembersView</code>
|
|
|
|
|
|
<a href="#club.views.ClubMembersView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>CanViewMixin</code>, <code>DetailFormView</code></p>
|
|
|
|
|
|
<p>View of a club's members.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.ClubMembersView.form_valid" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">form_valid</span><span class="p">(</span><span class="n">form</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.ClubMembersView.form_valid" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Check user rights.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/views.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-270">270</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-271">271</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-272">272</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-273">273</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-274">274</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-275">275</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-276">276</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-277">277</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-278">278</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-279">279</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-280">280</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-281">281</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-282">282</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-283">283</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-270"><a id="__codelineno-0-270" name="__codelineno-0-270"></a><span class="k">def</span> <span class="nf">form_valid</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">form</span><span class="p">):</span>
|
|
</span><span id="__span-0-271"><a id="__codelineno-0-271" name="__codelineno-0-271"></a><span class="w"> </span><span class="sd">"""Check user rights."""</span>
|
|
</span><span id="__span-0-272"><a id="__codelineno-0-272" name="__codelineno-0-272"></a> <span class="n">resp</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">form_valid</span><span class="p">(</span><span class="n">form</span><span class="p">)</span>
|
|
</span><span id="__span-0-273"><a id="__codelineno-0-273" name="__codelineno-0-273"></a>
|
|
</span><span id="__span-0-274"><a id="__codelineno-0-274" name="__codelineno-0-274"></a> <span class="n">data</span> <span class="o">=</span> <span class="n">form</span><span class="o">.</span><span class="n">clean</span><span class="p">()</span>
|
|
</span><span id="__span-0-275"><a id="__codelineno-0-275" name="__codelineno-0-275"></a> <span class="n">users</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"users"</span><span class="p">,</span> <span class="p">[])</span>
|
|
</span><span id="__span-0-276"><a id="__codelineno-0-276" name="__codelineno-0-276"></a> <span class="n">users_old</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"users_old"</span><span class="p">,</span> <span class="p">[])</span>
|
|
</span><span id="__span-0-277"><a id="__codelineno-0-277" name="__codelineno-0-277"></a> <span class="k">for</span> <span class="n">user</span> <span class="ow">in</span> <span class="n">users</span><span class="p">:</span>
|
|
</span><span id="__span-0-278"><a id="__codelineno-0-278" name="__codelineno-0-278"></a> <span class="n">Membership</span><span class="p">(</span><span class="n">club</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">get_object</span><span class="p">(),</span> <span class="n">user</span><span class="o">=</span><span class="n">user</span><span class="p">,</span> <span class="o">**</span><span class="n">data</span><span class="p">)</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>
|
|
</span><span id="__span-0-279"><a id="__codelineno-0-279" name="__codelineno-0-279"></a> <span class="k">for</span> <span class="n">user</span> <span class="ow">in</span> <span class="n">users_old</span><span class="p">:</span>
|
|
</span><span id="__span-0-280"><a id="__codelineno-0-280" name="__codelineno-0-280"></a> <span class="n">membership</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_object</span><span class="p">()</span><span class="o">.</span><span class="n">get_membership_for</span><span class="p">(</span><span class="n">user</span><span class="p">)</span>
|
|
</span><span id="__span-0-281"><a id="__codelineno-0-281" name="__codelineno-0-281"></a> <span class="n">membership</span><span class="o">.</span><span class="n">end_date</span> <span class="o">=</span> <span class="n">timezone</span><span class="o">.</span><span class="n">now</span><span class="p">()</span>
|
|
</span><span id="__span-0-282"><a id="__codelineno-0-282" name="__codelineno-0-282"></a> <span class="n">membership</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>
|
|
</span><span id="__span-0-283"><a id="__codelineno-0-283" name="__codelineno-0-283"></a> <span class="k">return</span> <span class="n">resp</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubOldMembersView" class="doc doc-heading">
|
|
<code>ClubOldMembersView</code>
|
|
|
|
|
|
<a href="#club.views.ClubOldMembersView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>CanViewMixin</code>, <code>DetailView</code></p>
|
|
|
|
|
|
<p>Old members of a club.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubSellingView" class="doc doc-heading">
|
|
<code>ClubSellingView</code>
|
|
|
|
|
|
<a href="#club.views.ClubSellingView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>CanEditMixin</code>, <code>DetailFormView</code></p>
|
|
|
|
|
|
<p>Sellings of a club.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubSellingCSVView" class="doc doc-heading">
|
|
<code>ClubSellingCSVView</code>
|
|
|
|
|
|
<a href="#club.views.ClubSellingCSVView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubSellingView</code></p>
|
|
|
|
|
|
<p>Generate sellings in csv for a given period.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h3 id="club.views.ClubSellingCSVView.StreamWriter" class="doc doc-heading">
|
|
<code>StreamWriter</code>
|
|
|
|
|
|
<a href="#club.views.ClubSellingCSVView.StreamWriter" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
|
|
<p>Implements a file-like interface for streaming the CSV.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h4 id="club.views.ClubSellingCSVView.StreamWriter.write" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">write</span><span class="p">(</span><span class="n">value</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.ClubSellingCSVView.StreamWriter.write" class="headerlink" title="Permanent link">¶</a></h4>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Write the value by returning it, instead of storing in a buffer.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/views.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-386">386</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-387">387</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-388">388</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-386"><a id="__codelineno-0-386" name="__codelineno-0-386"></a><span class="k">def</span> <span class="nf">write</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
|
|
</span><span id="__span-0-387"><a id="__codelineno-0-387" name="__codelineno-0-387"></a><span class="w"> </span><span class="sd">"""Write the value by returning it, instead of storing in a buffer."""</span>
|
|
</span><span id="__span-0-388"><a id="__codelineno-0-388" name="__codelineno-0-388"></a> <span class="k">return</span> <span class="n">value</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubEditView" class="doc doc-heading">
|
|
<code>ClubEditView</code>
|
|
|
|
|
|
<a href="#club.views.ClubEditView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>CanEditMixin</code>, <code>UpdateView</code></p>
|
|
|
|
|
|
<p>Edit a Club's main informations (for the club's members).</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubEditPropView" class="doc doc-heading">
|
|
<code>ClubEditPropView</code>
|
|
|
|
|
|
<a href="#club.views.ClubEditPropView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>CanEditPropMixin</code>, <code>UpdateView</code></p>
|
|
|
|
|
|
<p>Edit the properties of a Club object (for the Sith admins).</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubCreateView" class="doc doc-heading">
|
|
<code>ClubCreateView</code>
|
|
|
|
|
|
<a href="#club.views.ClubCreateView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>CanCreateMixin</code>, <code>CreateView</code></p>
|
|
|
|
|
|
<p>Create a club (for the Sith admin).</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.MembershipSetOldView" class="doc doc-heading">
|
|
<code>MembershipSetOldView</code>
|
|
|
|
|
|
<a href="#club.views.MembershipSetOldView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>CanEditMixin</code>, <code>DetailView</code></p>
|
|
|
|
|
|
<p>Set a membership as beeing old.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.MembershipDeleteView" class="doc doc-heading">
|
|
<code>MembershipDeleteView</code>
|
|
|
|
|
|
<a href="#club.views.MembershipDeleteView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>UserIsRootMixin</code>, <code>DeleteView</code></p>
|
|
|
|
|
|
<p>Delete a membership (for admins only).</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubStatView" class="doc doc-heading">
|
|
<code>ClubStatView</code>
|
|
|
|
|
|
<a href="#club.views.ClubStatView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>TemplateView</code></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.ClubMailingView" class="doc doc-heading">
|
|
<code>ClubMailingView</code>
|
|
|
|
|
|
<a href="#club.views.ClubMailingView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>CanEditMixin</code>, <code>DetailFormView</code></p>
|
|
|
|
|
|
<p>A list of mailing for a given club.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.ClubMailingView.add_new_mailing" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">add_new_mailing</span><span class="p">(</span><span class="n">cleaned_data</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.ClubMailingView.add_new_mailing" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Create a new mailing list from the form.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/views.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-574">574</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-575">575</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-576">576</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-577">577</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-578">578</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-579">579</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-580">580</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-581">581</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-582">582</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-583">583</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-584">584</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-585">585</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-586">586</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-587">587</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-574"><a id="__codelineno-0-574" name="__codelineno-0-574"></a><span class="k">def</span> <span class="nf">add_new_mailing</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cleaned_data</span><span class="p">)</span> <span class="o">-></span> <span class="n">ValidationError</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
|
|
</span><span id="__span-0-575"><a id="__codelineno-0-575" name="__codelineno-0-575"></a><span class="w"> </span><span class="sd">"""Create a new mailing list from the form."""</span>
|
|
</span><span id="__span-0-576"><a id="__codelineno-0-576" name="__codelineno-0-576"></a> <span class="n">mailing</span> <span class="o">=</span> <span class="n">Mailing</span><span class="p">(</span>
|
|
</span><span id="__span-0-577"><a id="__codelineno-0-577" name="__codelineno-0-577"></a> <span class="n">club</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">get_object</span><span class="p">(),</span>
|
|
</span><span id="__span-0-578"><a id="__codelineno-0-578" name="__codelineno-0-578"></a> <span class="n">email</span><span class="o">=</span><span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"mailing_email"</span><span class="p">],</span>
|
|
</span><span id="__span-0-579"><a id="__codelineno-0-579" name="__codelineno-0-579"></a> <span class="n">moderator</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">user</span><span class="p">,</span>
|
|
</span><span id="__span-0-580"><a id="__codelineno-0-580" name="__codelineno-0-580"></a> <span class="n">is_moderated</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
|
|
</span><span id="__span-0-581"><a id="__codelineno-0-581" name="__codelineno-0-581"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-582"><a id="__codelineno-0-582" name="__codelineno-0-582"></a> <span class="k">try</span><span class="p">:</span>
|
|
</span><span id="__span-0-583"><a id="__codelineno-0-583" name="__codelineno-0-583"></a> <span class="n">mailing</span><span class="o">.</span><span class="n">clean</span><span class="p">()</span>
|
|
</span><span id="__span-0-584"><a id="__codelineno-0-584" name="__codelineno-0-584"></a> <span class="k">except</span> <span class="n">ValidationError</span> <span class="k">as</span> <span class="n">validation_error</span><span class="p">:</span>
|
|
</span><span id="__span-0-585"><a id="__codelineno-0-585" name="__codelineno-0-585"></a> <span class="k">return</span> <span class="n">validation_error</span>
|
|
</span><span id="__span-0-586"><a id="__codelineno-0-586" name="__codelineno-0-586"></a> <span class="n">mailing</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>
|
|
</span><span id="__span-0-587"><a id="__codelineno-0-587" name="__codelineno-0-587"></a> <span class="k">return</span> <span class="kc">None</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.ClubMailingView.add_new_subscription" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">add_new_subscription</span><span class="p">(</span><span class="n">cleaned_data</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.ClubMailingView.add_new_subscription" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Add mailing subscriptions for each user given and/or for the specified email in form.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/views.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-589">589</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-590">590</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-591">591</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-592">592</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-593">593</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-594">594</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-595">595</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-596">596</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-597">597</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-598">598</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-599">599</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-600">600</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-601">601</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-602">602</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-603">603</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-604">604</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-605">605</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-606">606</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-607">607</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-608">608</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-609">609</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-610">610</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-611">611</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-612">612</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-613">613</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-614">614</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-615">615</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-616">616</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-617">617</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-618">618</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-619">619</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-620">620</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-621">621</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-589"><a id="__codelineno-0-589" name="__codelineno-0-589"></a><span class="k">def</span> <span class="nf">add_new_subscription</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cleaned_data</span><span class="p">)</span> <span class="o">-></span> <span class="n">ValidationError</span> <span class="o">|</span> <span class="kc">None</span><span class="p">:</span>
|
|
</span><span id="__span-0-590"><a id="__codelineno-0-590" name="__codelineno-0-590"></a><span class="w"> </span><span class="sd">"""Add mailing subscriptions for each user given and/or for the specified email in form."""</span>
|
|
</span><span id="__span-0-591"><a id="__codelineno-0-591" name="__codelineno-0-591"></a> <span class="n">users_to_save</span> <span class="o">=</span> <span class="p">[]</span>
|
|
</span><span id="__span-0-592"><a id="__codelineno-0-592" name="__codelineno-0-592"></a>
|
|
</span><span id="__span-0-593"><a id="__codelineno-0-593" name="__codelineno-0-593"></a> <span class="k">for</span> <span class="n">user</span> <span class="ow">in</span> <span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"subscription_users"</span><span class="p">]:</span>
|
|
</span><span id="__span-0-594"><a id="__codelineno-0-594" name="__codelineno-0-594"></a> <span class="n">sub</span> <span class="o">=</span> <span class="n">MailingSubscription</span><span class="p">(</span>
|
|
</span><span id="__span-0-595"><a id="__codelineno-0-595" name="__codelineno-0-595"></a> <span class="n">mailing</span><span class="o">=</span><span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"subscription_mailing"</span><span class="p">],</span> <span class="n">user</span><span class="o">=</span><span class="n">user</span>
|
|
</span><span id="__span-0-596"><a id="__codelineno-0-596" name="__codelineno-0-596"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-597"><a id="__codelineno-0-597" name="__codelineno-0-597"></a> <span class="k">try</span><span class="p">:</span>
|
|
</span><span id="__span-0-598"><a id="__codelineno-0-598" name="__codelineno-0-598"></a> <span class="n">sub</span><span class="o">.</span><span class="n">clean</span><span class="p">()</span>
|
|
</span><span id="__span-0-599"><a id="__codelineno-0-599" name="__codelineno-0-599"></a> <span class="k">except</span> <span class="n">ValidationError</span> <span class="k">as</span> <span class="n">validation_error</span><span class="p">:</span>
|
|
</span><span id="__span-0-600"><a id="__codelineno-0-600" name="__codelineno-0-600"></a> <span class="k">return</span> <span class="n">validation_error</span>
|
|
</span><span id="__span-0-601"><a id="__codelineno-0-601" name="__codelineno-0-601"></a>
|
|
</span><span id="__span-0-602"><a id="__codelineno-0-602" name="__codelineno-0-602"></a> <span class="n">sub</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>
|
|
</span><span id="__span-0-603"><a id="__codelineno-0-603" name="__codelineno-0-603"></a> <span class="n">users_to_save</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">sub</span><span class="p">)</span>
|
|
</span><span id="__span-0-604"><a id="__codelineno-0-604" name="__codelineno-0-604"></a>
|
|
</span><span id="__span-0-605"><a id="__codelineno-0-605" name="__codelineno-0-605"></a> <span class="k">if</span> <span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"subscription_email"</span><span class="p">]:</span>
|
|
</span><span id="__span-0-606"><a id="__codelineno-0-606" name="__codelineno-0-606"></a> <span class="n">sub</span> <span class="o">=</span> <span class="n">MailingSubscription</span><span class="p">(</span>
|
|
</span><span id="__span-0-607"><a id="__codelineno-0-607" name="__codelineno-0-607"></a> <span class="n">mailing</span><span class="o">=</span><span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"subscription_mailing"</span><span class="p">],</span>
|
|
</span><span id="__span-0-608"><a id="__codelineno-0-608" name="__codelineno-0-608"></a> <span class="n">email</span><span class="o">=</span><span class="n">cleaned_data</span><span class="p">[</span><span class="s2">"subscription_email"</span><span class="p">],</span>
|
|
</span><span id="__span-0-609"><a id="__codelineno-0-609" name="__codelineno-0-609"></a> <span class="p">)</span>
|
|
</span><span id="__span-0-610"><a id="__codelineno-0-610" name="__codelineno-0-610"></a>
|
|
</span><span id="__span-0-611"><a id="__codelineno-0-611" name="__codelineno-0-611"></a> <span class="k">try</span><span class="p">:</span>
|
|
</span><span id="__span-0-612"><a id="__codelineno-0-612" name="__codelineno-0-612"></a> <span class="n">sub</span><span class="o">.</span><span class="n">clean</span><span class="p">()</span>
|
|
</span><span id="__span-0-613"><a id="__codelineno-0-613" name="__codelineno-0-613"></a> <span class="k">except</span> <span class="n">ValidationError</span> <span class="k">as</span> <span class="n">validation_error</span><span class="p">:</span>
|
|
</span><span id="__span-0-614"><a id="__codelineno-0-614" name="__codelineno-0-614"></a> <span class="k">return</span> <span class="n">validation_error</span>
|
|
</span><span id="__span-0-615"><a id="__codelineno-0-615" name="__codelineno-0-615"></a> <span class="n">sub</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>
|
|
</span><span id="__span-0-616"><a id="__codelineno-0-616" name="__codelineno-0-616"></a>
|
|
</span><span id="__span-0-617"><a id="__codelineno-0-617" name="__codelineno-0-617"></a> <span class="c1"># Save users after we are sure there is no error</span>
|
|
</span><span id="__span-0-618"><a id="__codelineno-0-618" name="__codelineno-0-618"></a> <span class="k">for</span> <span class="n">user</span> <span class="ow">in</span> <span class="n">users_to_save</span><span class="p">:</span>
|
|
</span><span id="__span-0-619"><a id="__codelineno-0-619" name="__codelineno-0-619"></a> <span class="n">user</span><span class="o">.</span><span class="n">save</span><span class="p">()</span>
|
|
</span><span id="__span-0-620"><a id="__codelineno-0-620" name="__codelineno-0-620"></a>
|
|
</span><span id="__span-0-621"><a id="__codelineno-0-621" name="__codelineno-0-621"></a> <span class="k">return</span> <span class="kc">None</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-function">
|
|
|
|
|
|
<h3 id="club.views.ClubMailingView.remove_subscription" class="doc doc-heading">
|
|
<code class="highlight language-python"><span class="n">remove_subscription</span><span class="p">(</span><span class="n">cleaned_data</span><span class="p">)</span></code>
|
|
|
|
<a href="#club.views.ClubMailingView.remove_subscription" class="headerlink" title="Permanent link">¶</a></h3>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
|
|
<p>Remove specified users from a mailing list.</p>
|
|
|
|
<details class="quote">
|
|
<summary>Source code in <code>club/views.py</code></summary>
|
|
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-623">623</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-624">624</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-625">625</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-626">626</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-627">627</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-628">628</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-629">629</a></span>
|
|
<span class="normal"><a href="#__codelineno-0-630">630</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-623"><a id="__codelineno-0-623" name="__codelineno-0-623"></a><span class="k">def</span> <span class="nf">remove_subscription</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cleaned_data</span><span class="p">):</span>
|
|
</span><span id="__span-0-624"><a id="__codelineno-0-624" name="__codelineno-0-624"></a><span class="w"> </span><span class="sd">"""Remove specified users from a mailing list."""</span>
|
|
</span><span id="__span-0-625"><a id="__codelineno-0-625" name="__codelineno-0-625"></a> <span class="n">fields</span> <span class="o">=</span> <span class="p">[</span>
|
|
</span><span id="__span-0-626"><a id="__codelineno-0-626" name="__codelineno-0-626"></a> <span class="n">val</span> <span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">val</span> <span class="ow">in</span> <span class="n">cleaned_data</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="k">if</span> <span class="n">key</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"removal_"</span><span class="p">)</span>
|
|
</span><span id="__span-0-627"><a id="__codelineno-0-627" name="__codelineno-0-627"></a> <span class="p">]</span>
|
|
</span><span id="__span-0-628"><a id="__codelineno-0-628" name="__codelineno-0-628"></a> <span class="k">for</span> <span class="n">field</span> <span class="ow">in</span> <span class="n">fields</span><span class="p">:</span>
|
|
</span><span id="__span-0-629"><a id="__codelineno-0-629" name="__codelineno-0-629"></a> <span class="k">for</span> <span class="n">sub</span> <span class="ow">in</span> <span class="n">field</span><span class="p">:</span>
|
|
</span><span id="__span-0-630"><a id="__codelineno-0-630" name="__codelineno-0-630"></a> <span class="n">sub</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span>
|
|
</span></code></pre></div></td></tr></table></div>
|
|
</details>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.MailingDeleteView" class="doc doc-heading">
|
|
<code>MailingDeleteView</code>
|
|
|
|
|
|
<a href="#club.views.MailingDeleteView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>CanEditMixin</code>, <code>DeleteView</code></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.MailingSubscriptionDeleteView" class="doc doc-heading">
|
|
<code>MailingSubscriptionDeleteView</code>
|
|
|
|
|
|
<a href="#club.views.MailingSubscriptionDeleteView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>CanEditMixin</code>, <code>DeleteView</code></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.MailingAutoGenerationView" class="doc doc-heading">
|
|
<code>MailingAutoGenerationView</code>
|
|
|
|
|
|
<a href="#club.views.MailingAutoGenerationView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>View</code></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.PosterListView" class="doc doc-heading">
|
|
<code>PosterListView</code>
|
|
|
|
|
|
<a href="#club.views.PosterListView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>PosterListBaseView</code>, <code>CanViewMixin</code></p>
|
|
|
|
|
|
<p>List communication posters.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.PosterCreateView" class="doc doc-heading">
|
|
<code>PosterCreateView</code>
|
|
|
|
|
|
<a href="#club.views.PosterCreateView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>PosterCreateBaseView</code>, <code>CanCreateMixin</code></p>
|
|
|
|
|
|
<p>Create communication poster.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.PosterEditView" class="doc doc-heading">
|
|
<code>PosterEditView</code>
|
|
|
|
|
|
<a href="#club.views.PosterEditView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>ClubTabsMixin</code>, <code>PosterEditBaseView</code>, <code>CanEditMixin</code></p>
|
|
|
|
|
|
<p>Edit communication poster.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="doc doc-object doc-class">
|
|
|
|
|
|
|
|
<h2 id="club.views.PosterDeleteView" class="doc doc-heading">
|
|
<code>PosterDeleteView</code>
|
|
|
|
|
|
<a href="#club.views.PosterDeleteView" class="headerlink" title="Permanent link">¶</a></h2>
|
|
|
|
|
|
<div class="doc doc-contents ">
|
|
<p class="doc doc-class-bases">
|
|
Bases: <code>PosterDeleteBaseView</code>, <code>ClubTabsMixin</code>, <code>CanEditMixin</code></p>
|
|
|
|
|
|
<p>Delete communication poster.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="doc doc-children">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
</div>
|
|
|
|
|
|
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
|
|
|
|
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<footer class="md-footer">
|
|
|
|
|
|
|
|
<nav class="md-footer__inner md-grid" aria-label="Pied de page" >
|
|
|
|
|
|
<a href="../models/" class="md-footer__link md-footer__link--prev" aria-label="Précédent: Models">
|
|
<div class="md-footer__button md-icon">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
|
|
</div>
|
|
<div class="md-footer__title">
|
|
<span class="md-footer__direction">
|
|
Précédent
|
|
</span>
|
|
<div class="md-ellipsis">
|
|
Models
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
|
|
|
|
<a href="../../com/models/" class="md-footer__link md-footer__link--next" aria-label="Suivant: Models">
|
|
<div class="md-footer__title">
|
|
<span class="md-footer__direction">
|
|
Suivant
|
|
</span>
|
|
<div class="md-ellipsis">
|
|
Models
|
|
</div>
|
|
</div>
|
|
<div class="md-footer__button md-icon">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg>
|
|
</div>
|
|
</a>
|
|
|
|
</nav>
|
|
|
|
|
|
<div class="md-footer-meta md-typeset">
|
|
<div class="md-footer-meta__inner md-grid">
|
|
<div class="md-copyright">
|
|
|
|
|
|
Made with
|
|
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
|
Material for MkDocs
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
</div>
|
|
<div class="md-dialog" data-md-component="dialog">
|
|
<div class="md-dialog__inner md-typeset"></div>
|
|
</div>
|
|
|
|
|
|
<script id="__config" type="application/json">{"base": "../../..", "features": ["navigation.footer", "content.code.annotate", "content.code.copy", "content.tabs.link"], "search": "../../../assets/javascripts/workers/search.6ce7567c.min.js", "translations": {"clipboard.copied": "Copi\u00e9 dans le presse-papier", "clipboard.copy": "Copier dans le presse-papier", "search.result.more.one": "1 de plus sur cette page", "search.result.more.other": "# de plus sur cette page", "search.result.none": "Aucun document trouv\u00e9", "search.result.one": "1 document trouv\u00e9", "search.result.other": "# documents trouv\u00e9s", "search.result.placeholder": "Taper pour d\u00e9marrer la recherche", "search.result.term.missing": "Non trouv\u00e9", "select.version": "S\u00e9lectionner la version"}}</script>
|
|
|
|
|
|
<script src="../../../assets/javascripts/bundle.525ec568.min.js"></script>
|
|
|
|
|
|
</body>
|
|
</html> |