Create a new session instance. Guaranteed to create a new object with a unique key and will have saved the result once (with empty data) before the method returns.
(self)
| 464 | return await sync_to_async(self.exists)(session_key) |
| 465 | |
| 466 | def create(self): |
| 467 | """ |
| 468 | Create a new session instance. Guaranteed to create a new object with |
| 469 | a unique key and will have saved the result once (with empty data) |
| 470 | before the method returns. |
| 471 | """ |
| 472 | raise NotImplementedError( |
| 473 | "subclasses of SessionBase must provide a create() method" |
| 474 | ) |
| 475 | |
| 476 | async def acreate(self): |
| 477 | return await sync_to_async(self.create)() |