Ajout fonctions appelees par le template manager_add

This commit is contained in:
Paul Marillonnet 2017-02-24 12:14:54 +01:00
parent 0b5fce9b9c
commit d59025e6ec
4 changed files with 33 additions and 4 deletions

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ldap', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='ldapresource',
options={'verbose_name': 'LDAP'},
),
]

View File

@ -27,11 +27,20 @@ def get_org_unit(u):
return 0
class LDAPResource(BaseResource):
class Meta:
verbose_name = 'LDAP'
def get_absolute_url(self):
return reverse('ldap-view', kwargs={'slug': self.slug})
@classmethod
def get_icon_class(cls):
return 'grid'
@classmethod
def get_add_url(cls):
return reverse('ldap-add')
@classmethod
def get_verbose_name(cls):
return "LDAP Connector"
@ -39,4 +48,3 @@ class LDAPResource(BaseResource):
@classmethod
def is_enabled(cls):
return True

View File

@ -55,7 +55,8 @@ class NewQueryView(CreateView):
return {'resource': 'fooid'}
def get_success_url(self):
return self.object.resource.get_absolute_url()
#return self.object.resource.get_absolute_url()
return "/"
class UpdateQueryView(UpdateView):
@ -71,4 +72,5 @@ class UpdateQueryView(UpdateView):
return ctx
def get_success_url(self):
return self.object.resource.get_absolute_url()
#return self.object.resource.get_absolute_url()
return "/"

View File

@ -109,7 +109,7 @@ INSTALLED_APPS = (
'bdp',
'base_adresse',
'csvdatasource',
#'ldap',
'ldap',
'orange',
'family',
# backoffice templates and static
@ -120,6 +120,7 @@ INSTALLED_APPS = (
PASSERELLE_APP_CLICRDV_ENABLED = True
PASSERELLE_APP_BASE_ADRESSE_ENABLED = True
PASSERELLE_APP_CSVDATASOURCE_ENABLED = True
PASSERELLE_APP_LDAP_ENABLED = True
PASSERELLE_APP_CHOOSIT_ENABLED = True
PASSERELLE_APP_OXYD_ENABLED = True
PASSERELLE_APP_OVH_ENABLED = True