This commit is contained in:
Martin Pépin 2017-10-26 09:34:56 +02:00
parent 2aa2dafa13
commit 63963ce1f0
5 changed files with 18 additions and 37 deletions

View file

@ -4,23 +4,6 @@ from .decorators import buro_required
from . import views, petits_cours_views
export_patterns = [
url(r'^members$',
views.export_members,
name="export.members"),
url(r'^mega/avecremarques$', views.export_mega_remarksonly),
url(r'^mega/participants$',
views.export_mega_participants,
name="export.mega.participants"),
url(r'^mega/orgas$',
views.export_mega_orgas,
name="export.mega.orgas"),
url(r'^mega/(?P<type>.+)$', views.export_mega_bytype),
url(r'^mega$',
views.export_mega,
name="export.mega"),
]
petitcours_patterns = [
url(r'^inscription$', petits_cours_views.inscription,
name='petits-cours-inscription'),

View file

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
"""
Django common settings for cof project.
Django common settings for GestioCOF
Everything which is supposed to be identical between the production server and
the local development server should be here.
@ -55,26 +54,22 @@ BASE_DIR = os.path.dirname(
# Application definition
INSTALLED_APPS = [
'gestioncof',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'grappelli',
'django.contrib.admin',
'django.contrib.admindocs',
'bda',
'autocomplete_light',
'captcha',
'django_cas_ng',
'bootstrapform',
'kfet',
'kfet.open',
'channels',
'widget_tweaks',
'custommail',
'nested_admin',
'djconfig',
'wagtail.wagtailforms',
'wagtail.wagtailredirects',
@ -91,6 +86,12 @@ INSTALLED_APPS = [
'wagtailmenus',
'modelcluster',
'taggit',
'bda.apps.BdAConfig',
'bds.apps.BDSConfig',
'cof.apps.COFConfig',
'gestion.apps.GestionConfig',
'kfet',
'kfet.open',
'kfet.auth',
'kfet.cms',
]
@ -110,7 +111,7 @@ MIDDLEWARE_CLASSES = [
'wagtail.wagtailredirects.middleware.RedirectMiddleware',
]
ROOT_URLCONF = 'cof.urls'
ROOT_URLCONF = 'gestioCOF.urls'
TEMPLATES = [
{
@ -123,12 +124,12 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'wagtailmenus.context_processors.wagtailmenus',
'djconfig.context_processors.config',
'gestioncof.shared.context_processor',
'gestion.context_processors.context_processor',
'kfet.auth.context_processors.temporary_auth',
'kfet.context_processors.config',
],

View file

@ -1,4 +1,3 @@
import autocomplete_light
import gestion.urls
import kfet.urls
import bda.urls
@ -14,13 +13,11 @@ from django.contrib import admin
from django.contrib.auth import views as django_views
from cof import views as cof_views
from cof.urls import export_patterns, petitcours_patterns, \
surveys_patterns, calendar_patterns
from cof.urls import petitcours_patterns, surveys_patterns, calendar_patterns
from cof.autocomplete import autocomplete
from gestion import views as gestion_views
autocomplete_light.autodiscover()
admin.autodiscover()
urlpatterns = [
@ -34,8 +31,6 @@ urlpatterns = [
url(r'^admin/', admin.site.urls),
# Le BdA
url(r'^bda/', include(bda.urls)),
# Les exports
url(r'^export/', include(export_patterns)),
# Les petits cours
url(r'^petitcours/', include(petitcours_patterns)),
# Les sondages

View file

@ -93,6 +93,7 @@ class AccountPwdForm(forms.Form):
raise ValidationError("Les mots de passes sont différents")
super(AccountPwdForm, self).clean()
class ProfileForm(forms.ModelForm):
# def clean_is_cof(self):
# instance = getattr(self, 'instance', None)
@ -102,10 +103,11 @@ class ProfileForm(forms.ModelForm):
# return False
class Meta:
model = Profile
model = Profile
# XXX. I am removing is_cof from here.
fields = ['login_clipper', 'departement']
class ProfileRestrictForm(ProfileForm):
class Meta(ProfileForm.Meta):
fields = ['departement']

View file

@ -33,7 +33,7 @@ from .config import kfet_config
from .decorators import teamkfet_required
from .forms import (
AccountTriForm, AccountBalanceForm, AccountNoTriForm, UserForm,
UserRestrictTeamForm, UserGroupForm, AccountForm, CofRestrictForm,
UserRestrictTeamForm, UserGroupForm, AccountForm, UserRestrictForm,
AccountPwdForm, AccountNegativeForm, UserRestrictForm, AccountRestrictForm,
CheckoutForm, CheckoutRestrictForm, CheckoutStatementCreateForm,
CheckoutStatementUpdateForm, ArticleForm, ArticleRestrictForm,