Ajout fonctions appelees par le template manager_add
This commit is contained in:
parent
0b5fce9b9c
commit
d59025e6ec
|
@ -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'},
|
||||
),
|
||||
]
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 "/"
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue