samedi 31 mai 2014

TranslateApiException: The Azure Market Place Translator Subscription associated with the request credentials has zero balance. : ID=5005.V2_Json.Translate.50948394


I'm using Django 1.6. I am trying to work out whether there is a way to set a default for the option that appears in a dropdown box on the admin site (rather than the blank ------ option that appears). Specifically I am working with dropdown boxes for foreign keys, so they have no "choice" field.




U may try


in models.py :


foreign_key_field = models.ForeignKey("keyname", default=1)

which shows the first record in all comboboxes. U may change default=1 to any id that u want to show.



I'm using Django 1.6. I am trying to work out whether there is a way to set a default for the option that appears in a dropdown box on the admin site (rather than the blank ------ option that appears). Specifically I am working with dropdown boxes for foreign keys, so they have no "choice" field.



U may try


in models.py :


foreign_key_field = models.ForeignKey("keyname", default=1)

which shows the first record in all comboboxes. U may change default=1 to any id that u want to show.


Related Posts:

0 commentaires:

Enregistrer un commentaire