Django Admin drop down combobox and assigned values
Posted
by Daniel Garcia
on Stack Overflow
See other posts from Stack Overflow
or by Daniel Garcia
Published on 2010-05-06T00:26:19Z
Indexed on
2010/05/06
0:38 UTC
Read the original article
Hit count: 484
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
© Stack Overflow or respective owner