Re: ManyToMany field documented correctly on django docs ?
I have done that: Here is the ticket: http://code.djangoproject.com/ticket/13718 On Jun 8, 4:56 am, Russell Keith-Magee wrote: > On Tue, Jun 8, 2010 at 4:07 AM, gvkalra wrote: > > Hi. > > Please have a look > > here:http://docs.djangoproject.com/en/1.2/topics/db/models/#many-to-many-r... > > > The line I am pointing to is: > > As with ForeignKey, you can also create recursive relationships (an > > object with a many-to-one relationship to itself) and relationships to > > models not yet defined; see the model field reference for details. > > > shouldn't that be: an object with a many-to-many (instead of many-to- > > one) relationship to itself ? Since the relation is recursive but also > > has many-to-many property at the same time! > > Looks like a typo to me. Please open a ticket so that this isn't forgotten. > > Yours, > Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
ManyToMany field documented correctly on django docs ?
Hi. Please have a look here: http://docs.djangoproject.com/en/1.2/topics/db/models/#many-to-many-relationships The line I am pointing to is: As with ForeignKey, you can also create recursive relationships (an object with a many-to-one relationship to itself) and relationships to models not yet defined; see the model field reference for details. shouldn't that be: an object with a many-to-many (instead of many-to- one) relationship to itself ? Since the relation is recursive but also has many-to-many property at the same time! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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: Open source project looking for developer
Thumbs up from me! On Jun 1, 4:31 pm, James wrote: > Pressed the wrong button and posted prematurely ... :-/ > > Hi, > > http://www.myjobseek.net/is a tool for job seekers to organise their > job hunt, storing details of jobs applied for and applications, making > it easy to re-use covering letters and so on. To-do lists and > reminders are included to. However, as I only develop it when I'm job > hunting, it's in a early state. (Thankfully I haven't been job-hunting > much recently) > > If I open sourced it, would people be intrested in picking this up and > working on in? (It's in Django, of course) Reply off list if you > want. > > Sorry if this is off-topic (& for my stupidity in posting twice!) > James -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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: Auto populate currently logged in user's user id in forms
I think that I figured it out . we can use commit=False then get the user from request.user .. am I correct ? ... any other way ?? On May 31, 6:03 pm, gvkalra wrote: > Hi. > Here what I have > donehttp://github.com/gvkalra/showtime/blob/master/photo/views.py > > What I want to do is: > Auto populate the database with currently logged in user's user id > like it has been done with the date of creation of the record by > using > uploaded = models.DateField(auto_now_add=True) > > how to do that with: > clicked_by = models.ForeignKey(User) ?? > > something like > clicked_by = models.ForeignKey(User.username, editable=False) > > {though it doesn't work, but just to demonstrate the idea} -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
Auto populate currently logged in user's user id in forms
Hi. Here what I have done http://github.com/gvkalra/showtime/blob/master/photo/views.py What I want to do is: Auto populate the database with currently logged in user's user id like it has been done with the date of creation of the record by using uploaded = models.DateField(auto_now_add=True) how to do that with: clicked_by = models.ForeignKey(User) ?? something like clicked_by = models.ForeignKey(User.username, editable=False) {though it doesn't work, but just to demonstrate the idea} -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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: passing variable values in javascript being served statically
Hi. here is the code: http://pastebin.com/HtNq52aV what i am trying to do:: get the visitor location from his IP address in {{latitude}} and {{longitude}} . get my business location in {{BUSINESS_LOCATION}} . then trace a route from visitor location to my business location. On May 25, 1:25 am, Daniel Roseman wrote: > On May 24, 8:24 pm,gvkalra wrote: > > > > > Hi. > > I am trying to do something like this: > > > views.py > > > return render_to_response('abc.html',{'variable':value}) > > > abc.html > > > > > dummy = {{variable}}; > > > > > > > My problem: > > I am not able to use dummy inside xyz.js ... OR is there some > > other way by which I can use {{variable}} inside xyz.js ?? > > This is generally the right approach. What is the value of 'variable' > though? If it's a string, you'll need to wrap it in quotes for the > javascript to be valid. Also, the rule with Javascript is that > variables defined outside of a function need to be defined with "var" > to be global. > > var dummy = "{{variable}}"; > -- > DR. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://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-us...@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: passing variable values in javascript being served statically
yes it is a js problem .. But I was looking for a way in which I can use Django Variables passed by a view function inside a statically served js ... since it's static, the template engine won't parse it . On May 25, 12:38 am, Rodrigue Villetard wrote: > Hello, > > I think you can use xyz.js as a template : > return render_to_response('xyz.js' > > > > > {'variable':value}) > > Your problem is more a javscript problem of variable visibility as src="xyz.js"> doesn't properly make an include. > > regards. > > 2010/5/24 gvkalra <gvka...@gmail.com> > > > > > Hi. > > I am trying to do something like this: > > > views.py > > > return render_to_response('abc.html',{'variable':value}) > > > abc.html > > > <script> > > dummy = {{variable}}; > > > > > > > My problem: > > I am not able to use dummy inside xyz.js ... OR is there some > > other way by which I can use {{variable}} inside xyz.js ?? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@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. > > -- > Rodrigue Villetard > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://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-us...@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.
passing variable values in javascript being served statically
Hi. I am trying to do something like this: views.py return render_to_response('abc.html',{'variable':value}) abc.html dummy = {{variable}}; My problem: I am not able to use dummy inside xyz.js ... OR is there some other way by which I can use {{variable}} inside xyz.js ?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
django vs tornado
hi i have a presentation to make on django, wherein I have decided to include a section on Tornado I wish to show performance comparisons between django and tornado . how do I set up the scenario ?? . what I intend to achieve is this graph: http://wiki.developers.facebook.com/images/e/e8/Chart.png Please help me out -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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: "django-admin.py startproject xyz" opens text editor
Thanks a lot! It worked .. On Feb 9, 1:56 pm, chiranjeevi muttoju wrote: > Hi, please change the *.py properties to python type.. > i.e. > right click on python filr-->properties-->change-->browse the > python.exe(which is in python home directory). > > > > On Tue, Feb 9, 2010 at 12:07 PM, Karen Tracey wrote: > > On Tue, Feb 9, 2010 at 1:32 AM, gvkalra wrote: > > >> "django-admin.py startproject xyz" opens my default text editor viz. > >> Notepad++ and opens the file django-admin.py in it for editing...What > >> could be the reason? I am not able to create a project > > > I guess you are on Windows? Apparently the .py extension has been > > associated with your editor executable instead of python.exe. > > > Karen > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@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. > > -- > ▒▒�...@g@d...@◄▒▒ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.
"django-admin.py startproject xyz" opens text editor
"django-admin.py startproject xyz" opens my default text editor viz. Notepad++ and opens the file django-admin.py in it for editing...What could be the reason? I am not able to create a project -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.