cookies command

Important

This feature requires the django-cookie-consent library to be installed. Starting with Tethys 5.0 or if you are using micro-tethys-platform, you will need to install django-cookie-consent using conda or pip as follows:

# conda: conda-forge channel strongly recommended
conda install -c conda-forge django-cookie-consent

# pip
pip install django-cookie-consent

Warning

These commands are for development use only. Cookies are officially managed via cookies.yml files stored in the code base of both Tethys Portal and its installed apps. See Cookie Consent (Optional).

List, create and purge both cookie groups and their respective cookies.

usage: tethys cookies [-h]
                      {list,purge,add_group,add_cookie,delete_group,delete_cookie}
                      ...

Sub-commands

list

List existing cookie groups and cookies.

tethys cookies list [-h]

purge

Purge existing cookie groups and cookies.

tethys cookies purge [-h]

add_group

Add a new cookie group (e.g. Necessary, Analytics, etc.).

tethys cookies add_group [-h] [-d DESCRIPTION] [-r] [-x] [-o ORDERING]
                         varname name

Positional Arguments

varname

Variable name for the cookie group (e.g. necessary, analytics, etc.).

name

Display name for the cookie group (e.g. Necessary, Analytics, etc.).

Named Arguments

-d, --description

Description of the cookie group.

Default: ''

-r, --is_required

Flag indicating if the cookie group is required. Default is False.

Default: False

-x, --is_deletable

Flag indicating if the cookie group is deletable. Default is True.

Default: True

-o, --ordering

Ordering of the cookie group. Default is the auto-incremented primary key.

Default: 0

delete_group

Delete cookie group (e.g. Necessary, Analytics, etc.).

tethys cookies delete_group [-h] [-c] varname

Positional Arguments

varname

Variable name of the cookie group to delete.

Named Arguments

-c, --cascade

Delete all cookies associated with the group. If False, the cookie group must be empty. Default is False.

Default: False