You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.
Exception message verbosity for related (and failed) lookups could be enhanced by adding the source object's type, identity and, if set, the querytime used for the lookup.
Note that the DoesNotExist class is bound to the related model's class.
So, the following code would raise an Article.DoesNotExist exception if no article is found:
class Journal(Versionable):
name = CharField(...)
class Article(Versionable):
name = CharField(...)
journal = VersionedForeignKey(Journal)
# ...some code happens here...
# Assume there's no current journal assigned to article, this would raise a Journal.DoesNotExist exception saying: "DoesNotExist: Journal matching query does not exist."
journal = article.journal
The text was updated successfully, but these errors were encountered:
Exception message verbosity for related (and failed) lookups could be enhanced by adding the source object's type, identity and, if set, the querytime used for the lookup.
Note that the DoesNotExist class is bound to the related model's class.
So, the following code would raise an
Article.DoesNotExist
exception if no article is found:The text was updated successfully, but these errors were encountered: