Slugs
DatastoreSlug
¶
Bases: DomainObject
Object for a datastore slug row.
Source code in ckanext/versioned_datastore/model/slugs.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
get_slug_string()
¶
Returns the slug string to be used for this slug. This will be the first non- None value from the following attributes in this order: reserved_pretty_slug, pretty_slug or id.
Returns:
| Type | Description |
|---|---|
|
the slug string |
Source code in ckanext/versioned_datastore/model/slugs.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
on_slug(slug_string)
staticmethod
¶
Returns an or query that can be used to find the slug in the database with the passed slug string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
slug_string
|
the slug string |
required |
Returns:
| Type | Description |
|---|---|
|
an or filter |
Source code in ckanext/versioned_datastore/model/slugs.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
NavigationalSlug
¶
Bases: DomainObject
Object for a navigational slug.
Source code in ckanext/versioned_datastore/model/slugs.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
get_slug_string()
¶
Returns the slug string to be used for this slug.
Returns:
| Type | Description |
|---|---|
|
the slug string |
Source code in ckanext/versioned_datastore/model/slugs.py
94 95 96 97 98 99 100 | |
on_slug(slug_string)
staticmethod
¶
Returns an or query that can be used to find the slug in the database with the passed slug string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
slug_string
|
the slug string |
required |
Returns:
| Type | Description |
|---|---|
|
a filter |
Source code in ckanext/versioned_datastore/model/slugs.py
102 103 104 105 106 107 108 109 110 111 | |