You could do this with some javascript, which might work better in the
following scenario:
If you change the state of Completed between True and False, then
other options will be enabled/disabled for you by the javascript
My "take" on the admin screens is its a facility to fiddle with the
model,
On Feb 28, 12:21 pm, Simon Davies wrote:
> figured out how to do it using the get_form method like this:
>
> class AccessoryStockOrderAdmin(admin.ModelAdmin):
> form = AccessoryStockOrderForm
> def get_form(self, request, obj=None, **kwargs):
> form = super(AccessoryStockOrderAdm
figured out how to do it using the get_form method like this:
class AccessoryStockOrderAdmin(admin.ModelAdmin):
form = AccessoryStockOrderForm
def get_form(self, request, obj=None, **kwargs):
form = super(AccessoryStockOrderAdmin, self).get_form(request,
obj, **kwargs)
if o
Hi
I have a model which I access from the admin application. I want to
exclude some fields dynamically.
My model looks like this:
class StockOrder(models.Model):
number_of_items_pending_order =
models.PositiveIntegerField(max_length=5, default=1)
number_of_items_ordered = models
4 matches
Mail list logo