|
Question: the docs sometimes have e.g. and sometimes Is there a reason for the difference? Also, is this the best place to ask questions, or is there a forum or chat or something? Or should I use StackOverflow? |
Replies: 1 comment 1 reply
|
Ok, so I enabled the github discussions as a place for asking questions and discussing changes etc. The annotations are totally optional and everything will work as expected without them. You always get in return (for FK field): but you can initialize a related model in several ways:
So when you put Probably I should provide some kind of custom type with overloading to annotate relations but as you can see above it is not trivial. |
Ok, so I enabled the github discussions as a place for asking questions and discussing changes etc.
The annotations are totally optional and everything will work as expected without them.
The relations fields are actually quite complex and hard to annotate as they behave like this:
You always get in return (for FK field):
ormar.Modelinstance or Nonebut you can initialize a related model in several ways:
ormar.Modelinstance (pass Department instance in example above)So when you put
department: Optio…