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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |