Django Admin drop down combobox and assigned values
- by Daniel Garcia
I have several question for the Django Admin feature. Im kind of new in Django so im not sure how to do it.
Basically what Im looking to do is when Im adding information on the model.
Some of the fields i want them to be drop-downs and maybe combo-boxes with AutoCompleteMode.
Also looking for some fields to have the same information, for example if i have a datatime field I want that information to feed the fields day, month and year
from hoti.hotiapp.models import Occurrence
from django.contrib import admin
class MyModelAdmin(admin.ModelAdmin):
exclude = ['reference',]
admin.site.register(Occurrence, MyModelAdmin)
Anything helps
Thanks in advance