-- PostgreSQL database dump
--
-\restrict uoDsydSaI5FPlrxacSe4GcAWBxa12RWCgmwmzOXlefNHtJ99eaarw0pTVxjYoSs
+\restrict iyF1xJX6Rr5HXWxSVy3hc4tk2qFzInuecwfyZcCbdOKUcUhTZab2fHQNbRay16f
-- Dumped from database version 17.6 (Debian 17.6-0+deb13u1)
-- Dumped by pg_dump version 17.6 (Debian 17.6-0+deb13u1)
deleted_at timestamp with time zone,
deleted_by text,
license text NOT NULL,
- updated_at timestamp with time zone
+ updated_at timestamp with time zone,
+ description text
);
-- PostgreSQL database dump complete
--
-\unrestrict uoDsydSaI5FPlrxacSe4GcAWBxa12RWCgmwmzOXlefNHtJ99eaarw0pTVxjYoSs
+\unrestrict iyF1xJX6Rr5HXWxSVy3hc4tk2qFzInuecwfyZcCbdOKUcUhTZab2fHQNbRay16f
" that support blocklisting of known malicious or unwanted domains.",
"",
" List : %s" % self.list.name,
+ ]
+
+ # Add the description
+ if self.list.description:
+ lines += [
+ "",
+ " %s" % self.list.description,
+ "",
+ ]
+
+ lines += [
" License : %s" % self.list.license,
" Updated : %s" % self.list.updated_at.isoformat(),
"",
return slug
- def create(self, name, created_by, license):
+ def create(self, name, created_by, license, description=None):
"""
Creates a new list
"""
# Create a new list
return self.backend.db.insert(
List,
- name = name,
- slug = slug,
- created_by = created_by,
- license = license,
+ name = name,
+ slug = slug,
+ created_by = created_by,
+ license = license,
+ description = description,
)
# License
license : str
+ # Description
+ description : str
+
# Sources
sources : typing.List["Source"] = sqlmodel.Relationship(
back_populates="list",
default=os.environ.get("USER"), help=_("The creator of the list"))
create.add_argument("--license", required=True,
help=_("The license of the list"))
+ create.add_argument("--description",
+ help=_("The description of the list"))
create.set_defaults(func=self.__create)
# delete
Creates a new list
"""
backend.lists.create(
- name = args.name,
- created_by = args.created_by,
- license = args.license,
+ name = args.name,
+ created_by = args.created_by,
+ license = args.license,
+ description = args.description,
)
def __delete(self, backend, args):