When querying on Slack for CW puzzles, languages aren't taken into account in the Django queries. The `q` query will be a dictionary with a `languages` key that holds a Python list. The structure is like this: ```python {'languages': ['fortran', 'cobol', 'raku'], 'source': 'codewars', 'difficulty': 3} ``` The relevant data is stored as JSONB in Postgres. An example raw SQL query is: ```sql SELECT original_raw_data ->> 'languages' FROM puzzles_puzzle WHERE source='Codewars' LIMIT 1; -- ["javascript", "haskell", "python", "rust"] ``` The Django query should return a puzzle that includes all of the languages that in listed in the `q` query. See the notes that will be in `apps/puzzles/puzzles.py`.
When querying on Slack for CW puzzles, languages aren't taken into account in the Django queries.
The
qquery will be a dictionary with alanguageskey that holds a Python list. The structure is like this:{'languages': ['fortran', 'cobol', 'raku'], 'source': 'codewars', 'difficulty': 3}The relevant data is stored as JSONB in Postgres. An example raw SQL query is:
The Django query should return a puzzle that includes all of the languages that in listed in the
qquery.See the notes that will be in
apps/puzzles/puzzles.py.