Questions tagged [django-nani]

3 questions
5
votes
2 answers

Django admin field validation to return error not raise exception in application

I have a Django model where it has an upload field for images, am trying to validate the image field to check image size before storing and return elegant error message for the user to correct. I tried to use the following code but it did not…
Mo J. Mughrabi
  • 6,747
  • 16
  • 85
  • 143
0
votes
1 answer

django populating queryset into a dictionary

am not quite advanced python user, I am stuck trying to populate the below but I think am handling list_choices wrong. class LocationManager(TranslationManager): def get_location_list(self, lang_code, site=None): # this function is for…
Mo J. Mughrabi
  • 6,747
  • 16
  • 85
  • 143
0
votes
2 answers

How to make the ContentType foreignkey i18n?

I am developing an multilingual application using Django. One part is to select the type of something using the ContentType API. As describe in the doc, the ContentType object name is extracted from the verbose_name. In my case the verbose_name is…
Natim
  • 17,274
  • 23
  • 92
  • 150