how to show blank spaces at the start of string in django templates

2010-05-29 Thread Ogi Vranesic
Hi I formated with python numbers like e.g.: " 3457.50" " 11450.25" but my problem is to show them correctly one below the other in a column by django templates because the blank spaces are ignored. I tried with the filter escape, however it does not work. A solution would be to loop over th

Re: DatabaseError: subquery has too many columns

2010-07-25 Thread Ogi Vranesic
Obviously the subquery has too many columns, namely two: "error_test"."id", and "error_test"."name", but you want that only "error_test"."id" is NOT in select elements of the subquery. I'm not even sure that your approch makes sense. Greetings, Ogi >Hi all, >Just came across this error. >cla

error: 'get format is not defined' in DateTimeShortcuts.js

2010-08-05 Thread Ogi Vranesic
Hi dear django users After I updated Django to version 1.2.1 and in myproject/media/js replaced the old javascripts with the new from site-packages/django/contrib/admin/media/js and site-packages/django/contrib/admin/media/js/admin I become in DateTimeShortcuts.js the error 'get format is not def

error: get_format is not defined

2010-08-15 Thread Ogi Vranesic
Hi django users After updating Django to version 1.2.1 and replacing the old javascript files in myproject/media/js with the new files I become a error get_format is not defined in DateTimeShortcuts.js Can somebody tell me what I'm missing? Thanks in advance and best regards Ogi -- You re

ModelAdmin - related foreign keys

2010-02-09 Thread Ogi Vranesic
Hi I'm new in Django and want to explain my issue: For instance I have model A with foreign key to B and model B with foreign key to C. I would like to have add form of C with one B (extra = 1) and within B four A (extra = 4) With the following example in admin.py I can only achieve this partly:

InlineModelAdmin related items on two levels

2010-02-13 Thread Ogi Vranesic
Hi all I read the very good tutorial on http://docs.djangoproject.com/en/dev/ref/contrib/admin/ and understood that the admin interface has the ability to edit models on the same page as a parent model and these are called inlines. For two related models is this easy: class A (models.Model):

Re: InlineModelAdmin related items on two levels

2010-02-14 Thread Ogi Vranesic
>>On Feb 14, 6:19 am, Ogi Vranesic wrote: >> Hi all >> >> I read the very good tutorial onhttp://docs.djangoproject.com/en/dev/ref/contrib/admin/ >> and understood that the admin interface has the ability to edit models on the >> same page as a parent model a

override change_form.html & submit_line.html

2010-03-20 Thread Ogi Vranesic
Hi In order to adapt them I would like to override following templates: contrib/admin/templates/admin/change_form.html contrib/admin/templates/admin/submit_line.html and probably also contrib/admin/templates/admin/edit_inline/tabular.html In my project I have already a directory /emplates/admi

Re: override change_form.html & submit_line.html

2010-03-20 Thread Ogi Vranesic
>> Hi >> > >In order to adapt them I would like to override following templates: >> >> contrib/admin/templates/admin/change_form.html >> contrib/admin/templates/admin/submit_line.html >> and probably also >> contrib/admin/templates/admin/edit_inline/tabular.html >> > >In my project I have already a

Re: Extremely Frustrated

2011-04-22 Thread Ogi Vranesic
Could You also send us the definition of Book class? Ogi On Donnerstag 21 April 2011 10:00:17 pm you wrote: > Hello, > > I have been working through the Django Book, and I keep getting syntax > errors in the examples in Chapter 6. > > The following example works: > > class BookAdmin(admin.Mode

Re: ajax select box

2011-05-08 Thread Ogi Vranesic
Hallo You can use Dajax(ice) to solve your issue. First Dajax and Dajaxice must be installed. In your select box for countries add event 'onchange' i.e.: onchange="Dajaxice.ajax.getCitiesByCountry('Dajax.process', {'name':this.name, 'value':this.value})"> According to this example you must have

ValueError: Need 2 values to unpack in for loop; got 3 (actually num_loopvars = 2 and len_item = 3)

2017-07-17 Thread Ogi Vranesic
Hi I have used some templates in older django versions. But now in django 1.11 using the same templates, the error: ValueError: Need 2 values to unpack in for loop; got 3. will be raised on line 207 in module django.template.defaulttags by the method render of class ForNode Actually is by me l

ValueError: Need 2 values to unpack in for loop; got 3 (actually num_loopvars = 2 and len_item = 3)

2017-07-17 Thread Ogi Vranesic
pythonic. Best regards Ogi On 17.07.2017 16:08, Michal Petrucha wrote: On Mon, Jul 17, 2017 at 03:46:30PM +0200, Ogi Vranesic wrote: Hi I have used some templates in older django versions. But now in django 1.11 using the same templates, the error: ValueError: Need 2 values to unpack in for loop