Re: Views in django
Calculate in view, in template should print values . Can group it in dict i think. On Feb 3, 2012 10:39 PM, "Sandeep kaur" <mkaurkha...@gmail.com> wrote: > On Fri, Feb 3, 2012 at 7:52 PM, Weldan <mwel...@gmail.com> wrote: > > Entries.objects.count() > > > That will be applicable if I want to his for only 1 table's entry. > But here I have views as : > >cd = form.cleaned_data >name_and_address = cd['name_and_address'] >title = get_object_or_404(Variable, pk='1') >sign = get_object_or_404(Variable, pk='3') >from TCC11_12.automation.choices import * >client = > ClientJob.objects.filter(name_and_address=name_and_address) >amount = Amount.objects.all() >suspence = Suspence.objects.all() > > and for this I have template as : > > {% if client %} >{% for clients in client %} >{% for amounts in amount %} > > {% if clients.job_no == amounts.job_no %} > > {% if clients.name_and_address == clients.name_and_address %} > >{{ clients.receipt_no }} > {{ clients.date }} >{{amounts.total}} >{{amounts.net_total}} >{% endif %} > >{% endif %} > >{% endfor %} > >{% endfor %} > {% endif %} > > > When all this is applied, it creates a view out of 2 tables i.e Amount > and ClientJob without using foreign key. Now I want to have sum of the > total and net_total fields for the views generated. > > -- > Sandeep Kaur > E-Mail: mkaurkha...@gmail.com > Blog: sandymadaan.wordpress.com > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Views in django
Entries.objects.count() On Feb 3, 2012 10:12 PM, "Sandeep kaur"wrote: > Can I apply some operations on the views ( of database) that are > created by me? Eg: to do sum of some filtered entries. If yes, then > how? > > -- > Sandeep Kaur > E-Mail: mkaurkha...@gmail.com > Blog: sandymadaan.wordpress.com > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: TinyMCE, safe tag and wrong conversion of entities
unicode? On 25 January 2012 07:43, jurgenwrote: > In my admin interface, I can create a database entry which contains > HTML using TinyMCE. I do this to create publication entries for my > website. In the database, a publication entry stores entities using > numeric encoding. To render a list of publications, I use the safe tag > in the django template. The result looks correctly like this: > http://visdom.at/publications/ > > All entities are correctly shown. > > I use the same technique in another template to render only some of > the publications for a particular person: > http://www.visdom.at/jwaser > > However, here the ü's and ö's are messed up. What puzzles me even > more, is that the entities for the name Ribičić are correctly > displayed. > > What am I doing wrong? > > Thx for any help, > Jürgen > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to change column name in many2many relations?
https://docs.djangoproject.com/en/1.3/topics/db/models/#verbose-field-names set a readable name for column, or you want to refer other database table column ? sorry, but i have the urge to ask. why we should do that? thanks On 12 January 2012 18:36, ?manu*wrote: > I have solved by defining the model of the relation with a "through" > attribute. A little lenghty but effective... > > E. > > On Jan 12, 11:01 am, "?manu*" wrote: > > Is it possible to change the column name in many2many relations? > > > > I can change in in foreignKeys with the db_column attribute. I can > > change the table name in many2many relations with db_table. What about > > column names in many2many relations? > > > > Thanks, > > E. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
/?next= not redirect user
hi. can anyone show me how to do this . after successfully login user not redirected to request.path. thanks for advance -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: input of one select box into another
I am looking for same answer. Currently this is what i was doing: 1. load javascript into form page 2. for each select box, call ajax to return next select box value example: 1. form loaded, select box 1 has values 2. user choose values from select box 1, get select box 2 values with select box 1 chosen value, same on select box 3 has anyone did the same? or is there an easy/correct way to do this? On 7 January 2012 07:02, inzaghiwrote: > I have a form with two select boxes. the input of one will be used to > determine what gets loaded in the other. > In essence the second select box could have data populated into it > from > different models. > > 1 how would I do this ? and > 2.How would I accomplish this without reloading the page ? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.