0001-planitec-change-some-labels-from-planitech-to-planit.patch
passerelle/contrib/planitech/models.py | ||
---|---|---|
246 | 246 | |
247 | 247 |
class PlanitechConnector(BaseResource): |
248 | 248 |
url = models.URLField( |
249 |
max_length=400, verbose_name=_('Planitech API endpoint'),
|
|
250 |
help_text=_('URL of the Planitech API endpoint'))
|
|
249 |
max_length=400, verbose_name=_('Planitec API endpoint'), |
|
250 |
help_text=_('URL of the Planitec API endpoint')) |
|
251 | 251 |
username = models.CharField(max_length=128, verbose_name=_('Service username')) |
252 | 252 |
password = models.CharField( |
253 | 253 |
max_length=128, verbose_name=_('Service password'), null=True, blank=True) |
... | ... | |
259 | 259 |
category = _('Business Process Connectors') |
260 | 260 | |
261 | 261 |
class Meta: |
262 |
verbose_name = _('Planitech')
|
|
262 |
verbose_name = _('Planitec') |
|
263 | 263 | |
264 | 264 |
def _call_planitech(self, session_meth, endpoint, params=None): |
265 | 265 |
if not getattr(self, '_planitech_session', False): |
... | ... | |
381 | 381 |
response.raise_for_status() |
382 | 382 |
# the last response should have set a cookie which will be used for authentication |
383 | 383 |
except RequestException as e: |
384 |
raise APIError("Authentication to Planitech failed: %s" % str(e))
|
|
384 |
raise APIError("Authentication to Planitec failed: %s" % str(e)) |
|
385 | 385 | |
386 | 386 |
def get_or_create_pairing(self, post_data): |
387 | 387 |
with transaction.atomic(): |
388 |
- |