Skip to main content
0 votes
1 answer
576 views

I have two object models, NewsObject and StockObject. The stock object is a foreign key in the news object. class stockObject(models.Model): stock_name = CharField(max_length=100, blank=True, null=...
Chirag Rajgariah's user avatar
1 vote
0 answers
139 views

I want to set the background-color of a AutocompleteSelect field. When the page loads, the background-color is applied, but will be overwritten immediately (When loading the page, I see the background-...
RVE's user avatar
  • 348
0 votes
1 answer
54 views

I use Django. My admin.py: class CardInlineAdmin(admin.StackedInline): model = Card autocomplete_fields = ['project', 'course', 'vacancy', 'news', ] @admin.register(Section) class ...
serg's user avatar
  • 87
2 votes
0 answers
287 views

I encounter a problem when using the autocomplete fields in Django admin. #model.py class Party(models.Model): pass class Address(models.Model): party = models.ManyToManyField(Party,through='...
tt2218's user avatar
  • 21
0 votes
1 answer
1k views

I have Django application and admin page. Inside admin page, I have one model that has autocomplete_fields. I can sort results but, I can't sort the results. It always sort by pk and not by value ...
Marko Zadravec's user avatar
0 votes
1 answer
1k views

class InstitutionProfileAdmin(admin.ModelAdmin): def institute_pic_tag(self, obj): if obj.institute_pic: return format_html('<img src="{}" width="30x"/&...
Mahmudul Hassan's user avatar
1 vote
1 answer
3k views

Disclamer: This is an edit question because I got some answers until now. I would like to create an autocomplete field in InlineModelAdmin, with similar behavior as autocomplete_fields. I know, ...
Marko Zadravec's user avatar