constants.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. COLOR_CHOICES = (
  2. ('aa1409', 'Dark red'),
  3. ('f44336', 'Red'),
  4. ('e91e63', 'Pink'),
  5. ('ffe4e1', 'Rose'),
  6. ('ff66ff', 'Fuschia'),
  7. ('9c27b0', 'Purple'),
  8. ('673ab7', 'Dark purple'),
  9. ('3f51b5', 'Indigo'),
  10. ('2196f3', 'Blue'),
  11. ('03a9f4', 'Light blue'),
  12. ('00bcd4', 'Cyan'),
  13. ('009688', 'Teal'),
  14. ('00ffff', 'Aqua'),
  15. ('2f6a31', 'Dark green'),
  16. ('4caf50', 'Green'),
  17. ('8bc34a', 'Light green'),
  18. ('cddc39', 'Lime'),
  19. ('ffeb3b', 'Yellow'),
  20. ('ffc107', 'Amber'),
  21. ('ff9800', 'Orange'),
  22. ('ff5722', 'Dark orange'),
  23. ('795548', 'Brown'),
  24. ('c0c0c0', 'Light grey'),
  25. ('9e9e9e', 'Grey'),
  26. ('607d8b', 'Dark grey'),
  27. ('111111', 'Black'),
  28. ('ffffff', 'White'),
  29. )
  30. #
  31. # Filter lookup expressions
  32. #
  33. FILTER_CHAR_BASED_LOOKUP_MAP = dict(
  34. n='exact',
  35. ic='icontains',
  36. nic='icontains',
  37. iew='iendswith',
  38. niew='iendswith',
  39. isw='istartswith',
  40. nisw='istartswith',
  41. ie='iexact',
  42. nie='iexact'
  43. )
  44. FILTER_NUMERIC_BASED_LOOKUP_MAP = dict(
  45. n='exact',
  46. lte='lte',
  47. lt='lt',
  48. gte='gte',
  49. gt='gt'
  50. )
  51. FILTER_NEGATION_LOOKUP_MAP = dict(
  52. n='exact'
  53. )
  54. FILTER_TREENODE_NEGATION_LOOKUP_MAP = dict(
  55. n='in'
  56. )
  57. # Keys for PostgreSQL advisory locks. These are arbitrary bigints used by
  58. # the advisory_lock contextmanager. When a lock is acquired,
  59. # one of these keys will be used to identify said lock.
  60. #
  61. # When adding a new key, pick something arbitrary and unique so
  62. # that it is easily searchable in query logs.
  63. ADVISORY_LOCK_KEYS = {
  64. 'available-prefixes': 100100,
  65. 'available-ips': 100200,
  66. }