This is perfectly valid Python, but a bit hard to read because of the single-equals assignment immediately followed by double-equals comparison. Can you use parentheses to make it a bit easier to read?
```python
is_container_view = (view_name == 'container_preview')
```