Re: Extend admin template without copying the whole template

2011-02-27 Thread Alex Boyko
On Monday, 28 February 2011, Martin Brochhaus wrote: > Hi all, > I want to add a language switcher below the breadcrumb to all my django admin > pages. > Therefore I created templates/admin/base.html in my project. However I don't > want to copy the whole original base.html and add my changes -

Re: how to define choices option per model's instance

2010-12-02 Thread Alex Boyko
es = kwargs.get('range_marks') >del kwargs['range_marks'] >else: >_choices = (('default', 'default'), ) >self.range_marks = models.IntegerField(choices = _choices, > verbose_name = 'Marks of Something'

how to define choices option per model's instance

2010-12-01 Thread Alex Boyko
Hi! I got such kind of problem. I'd like to define the tuple(list) of choices option at the moment of instance created on the fly In the future these choices will not change. Hence I've found just one way to do it - override __init__() of my model and pass there the particular predefined list of c

Third party object like model field

2010-10-31 Thread Alex Boyko
Hello! I'd like to ask a bit newbie question but cannot realize how to do it. How I can implement following model: class Something(models.Model): name = models.CharField(max_length = 50) # and so on.. # next fields have predefined Django types #... ts = # where ts shou