Skip to content

Instantly share code, notes, and snippets.

View bensialih's full-sized avatar

Abdel Hakim Bensiali bensialih

  • earth
View GitHub Profile
@souen
souen / gist:913312
Created April 11, 2011 10:03
django-treemenu documentation

Django Tree Menus

This is a simple and generic tree-like menuing system for Django_ with an easy-to-use admin interface. It covers all the essentials for building tree-structured menus and should be enough for a lot of projects. It is also easily extendable if you need to add some special behaviour to your menu items.

@MightyPork
MightyPork / custom-serde.rs
Created June 11, 2019 20:34
example of custom serialize and deserialize in serde
use serde::ser::SerializeMap;
use serde::{Serialize, Serializer, de::Visitor, de::MapAccess, Deserialize, Deserializer};
use std::fmt;
#[derive(Debug)]
struct Custom(String, u32);
impl Serialize for Custom {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where