-
-
Save shabda/e69bc239cac805a970cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In [1]: import django; django.get_version() | |
| Out[1]: '1.8' | |
| In [2]: from django.db import transaction | |
| In [3]: transaction.set_autocommit(False) | |
| In [4]: from django.contrib.auth import get_user_model | |
| In [5]: get_user_model().objects.create(username="test_24921") | |
| --------------------------------------------------------------------------- | |
| TransactionManagementError Traceback (most recent call last) | |
| <ipython-input-5-364c4b9477ca> in <module>() | |
| ----> 1 get_user_model().objects.create(username="test_24921") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment