Skip to content

Instantly share code, notes, and snippets.

@court-jus
court-jus / next_big.py
Created July 5, 2017 09:33
Get next bigger number using the same digits
def next_bigger(m):
# Firtst convert the int to a list of digits.
m = map(int, str(m))
# Call the main function.
nxt = _next_bigger(m)
if nxt == -1:
return -1
class SerializedRelatedField(relations.RelatedField):
"""
A read-write field that uses a serializer when reading the relation but
expects the pk to be provided when creating or updating.
"""
default_error_messages = {
'does_not_exist': _('Object with pk={value} does not exist.'),
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: GET, POST, HEAD, OPTIONS
[
{
"id": 87,
"nom": "Panel 200",
"analyseur": {
@court-jus
court-jus / dabblet.css
Created March 2, 2012 14:31
Couleurs statuts colis
/**
* Couleurs statuts colis
*/
div
{
border: 1px solid gray;
}
.a {
From a736e93562d2ea84937b6ed45f12c7f5b74b4e24 Mon Sep 17 00:00:00 2001
From: Ghislain LEVEQUE <ghislain.leveque@clarisys.fr>
Date: Fri, 30 Jul 2010 15:02:00 +0200
Subject: [PATCH] adding translation for french
---
lettuce/languages.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lettuce/languages.py b/lettuce/languages.py