filtering foreign key field in form

2010-01-22 Thread Gaffar Durmaz
hi everybody, i have a problem with forms.. suppose we have a model class as like this class Something(models.Model): another_model = models.ForeignKey(AnotherModel, verbose_name=_ ('AnotherModel')) so i have a form for this class such as belove class

Creating UML diagram from my django models

2010-01-09 Thread Gaffar Durmaz
i wanna creating UML or ER diagram from my models.. is there any tools to creating automatically ? so i use Eclipse IDE.. maybe eclipse plugins or other.. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Initial values and unbound forms (apparently a bug?)

2009-12-05 Thread Gaffar Durmaz
i use in my form form = MatchForm(instance=match, initial={'startDate':'%s-%s-%s'% (y,mo,d),'startTime':'%s:%s:%s'%(h,mi,s)}) but ur initial value is a list, initial=[bla bla] instead of this use dict {} On Dec 5, 11:35 pm, Liam wrote: > Haven't been able to get

Re: How to get the last item of array in a built-in template tag?

2009-12-05 Thread Gaffar Durmaz
if u register EXPR tag in ur templatetag for example ur templatetag file is mytags.py in ur template load this as like {% load mytags %} so {% expr matchList.count() as i %} i is {{i}} {{matchList.i}} i does not tried this but i think it will.. On Dec 5, 10:19 pm, workingbird