Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread simonbun
I think that most people that ask for "ajax integration" want to see javascript helpers, as seen in many other frameworks. They're looking for things like for example {% auto_complete_tag .. params ..%}; wich would render an input box with the necessary javascript (inline..) that makes it

Re: Integrating third parties script within django

2007-04-10 Thread [EMAIL PROTECTED]
If you are integrating a 3rd party library or script into a django (or ANY python) project, it needs to be available on the python interpreter's path. It sounds like you are getting hung up on the mechanics of python's package/module rules. I would suggest familiarizing yourself with

Re: Detect ajax request

2007-04-10 Thread Nathaniel Whiteinge
I've been happily using limodou's suggestion with the jQuery framework for a few weeks, hopefully whatever framework you're using also sends the X-Requested-With header--it just feels cleaner. if request.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest': # do stuff... - whiteinge On

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread jfagnani
On Apr 10, 11:39 am, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > On Tue, 2007-04-10 at 18:11 +, Steve Bergman wrote: > > But Django definitely has a preferred ORM and a preferred templating > > engine. Why be so set on complete agnosticism when it comes to > > javascript? > > I agree. I

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread Russell Keith-Magee
On 4/11/07, Adam Findley <[EMAIL PROTECTED]> wrote: > > I like the idea that Django is AJAX implementation agnostic the same way > it is agnostic to the database you prefer to back your project (if any), > but, is there any work being done to create something in contrib to > facilitate working

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread Kenneth Gonsalves
On 10-Apr-07, at 11:41 PM, Steve Bergman wrote: > But Django definitely has a preferred ORM and a preferred templating > engine. Why be so set on complete agnosticism when it comes to > javascript? then, to complete your analogy, they would have to write and maintain their own javascript

Problem with select fields

2007-04-10 Thread Scott Hadfield
Hi, I'm having a problem with values not getting saved select fields. Specifically, select fields that are referencing an external type. Say I have a model such as: class MyModel(models.Model): field1 = models.ForeignKey(Foo) field2 = models.CharField(choices = (('1', 'first choice'), ('2',

Re: Anything special needed in URLconf for tilde?

2007-04-10 Thread ryan k
On Apr 10, 8:32 pm, "Brian Beck" <[EMAIL PROTECTED]> wrote: > On Apr 10, 8:31 pm, "Brian Beck" <[EMAIL PROTECTED]> wrote: > > > I'm not sure, but it might be that tildes aren't valid URL characters. > > Web browsers have to violate the spec in order to support this thanks > > to someone

Re: Playing with fixtures and django serializers -> Errors...

2007-04-10 Thread Russell Keith-Magee
On 4/11/07, akaihola <[EMAIL PROTECTED]> wrote: > > I wonder if it would be possible to use dumpdata and loaddata for > migration instead. Broadly speaking, it sounds viable. My only reservation would be that for large databases, dumping the entire contents to a text file isn't really a good

Re: Anything special needed in URLconf for tilde?

2007-04-10 Thread Brian Beck
On Apr 10, 8:31 pm, "Brian Beck" <[EMAIL PROTECTED]> wrote: > I'm not sure, but it might be that tildes aren't valid URL characters. > Web browsers have to violate the spec in order to support this thanks > to someone screwing up a long time ago... It might also just be the leading slash, have

Re: Anything special needed in URLconf for tilde?

2007-04-10 Thread Brian Beck
On Apr 10, 8:10 pm, "ryan k" <[EMAIL PROTECTED]> wrote: > > Am I missing something simple? I'm not sure, but it might be that tildes aren't valid URL characters. Web browsers have to violate the spec in order to support this thanks to someone screwing up a long time ago...

Re: How can I get stored information into a particular format? json, yui, django

2007-04-10 Thread Russell Keith-Magee
On 4/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm pretty new to Django... At the moment, I'm trying to get all of > the information stored in a database table into a format acceptable > for some javascript I plan to run (using the YUI libraries). > > I need it to be in a format

Re: NewForms Question..

2007-04-10 Thread Russell Keith-Magee
On 4/11/07, brad <[EMAIL PROTECTED]> wrote: > > Hello, I am using NewForms with my current Django project, but I am > stumped on one error message. Here's the error message: Cannot resolve > keyword 'organization' into field. Without knowing your model definitions, this is a guess, but I'd say

Re: Anything special needed in URLconf for tilde?

2007-04-10 Thread ryan k
On Apr 10, 8:08 pm, "ryan k" <[EMAIL PROTECTED]> wrote: > Hi. My django project lies in my public_html so I access my website > throughhttp://209.xxx.xxx.xx/~ryan/django-project. Do I have to do > anything special because of the tilde? > > Using the URLconf defined in kitabu.urls, Django tried

Anything special needed in URLconf for tilde?

2007-04-10 Thread ryan k
Hi. My django project lies in my public_html so I access my website through http://209.xxx.xxx.xx/~ryan/django-project. Do I have to do anything special because of the tilde? Using the URLconf defined in kitabu.urls, Django tried these URL patterns, in this order: 1.

Anyone attending the Web 2.0 Conference?

2007-04-10 Thread Corey Oordt
I see that Adrian is going to be at Web 2.0 next week. Anyone else going to be in town for a Birds of a Feather? Thanks, Corey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Simple python question

2007-04-10 Thread Todd O'Bryan
On Tue, 2007-04-10 at 18:03 -0500, Jeremy Dunck wrote: > On 4/10/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > ... > > The key is that he wanted to use the string name of the class, not the > > class itself. Assuming that Foo is available (i.e., is local to the code > > you're running or has been

Re: Simple python question

2007-04-10 Thread Masida
This should work: class Foo: def hello(self): return "Hello World" object = Foo() print object.hello() More information: http://www.diveintopython.org/object_oriented_framework/index.html Ciao, - Matt On Apr 11, 12:22 am, "Grupo Django" <[EMAIL PROTECTED]> wrote: > I know this

Re: Simple python question

2007-04-10 Thread Jeremy Dunck
On 4/10/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: ... > The key is that he wanted to use the string name of the class, not the > class itself. Assuming that Foo is available (i.e., is local to the code > you're running or has been imported), this should work: > > o = locals()['Foo']() Oh. In

Re: Drop-down choice or create new; how to handle?

2007-04-10 Thread Brian Rosner
On 2007-04-10 07:50:50 -0600, "Todd O'Bryan" <[EMAIL PROTECTED]> said: > > We've discovered in a couple of places that we need the ability for > people to choose something from a list or to create a new item. In the > admin, creating a new item involves having a pop-up open, but we'd like > to

Re: Simple python question

2007-04-10 Thread Todd O'Bryan
On Tue, 2007-04-10 at 17:50 -0500, Jeremy Dunck wrote: > On 4/10/07, Grupo Django <[EMAIL PROTECTED]> wrote: > > > > I know this is not the right place for asking about python, but it's a > > simple question. > > I need to load an object given in a string. Example: > > > > #I have a class called

Re: Simple python question

2007-04-10 Thread Jeremy Dunck
On 4/10/07, Grupo Django <[EMAIL PROTECTED]> wrote: > > I know this is not the right place for asking about python, but it's a > simple question. > I need to load an object given in a string. Example: > > #I have a class called foo > class foo: > def Hello(): > return "Hello World" >

NewForms Question..

2007-04-10 Thread brad
Hello, I am using NewForms with my current Django project, but I am stumped on one error message. Here's the error message: Cannot resolve keyword 'organization' into field. I am assuming that there is something wrong in my forms.py file in the application folder. Here's what I have in forms.py,

Re: Global model/view best practice help

2007-04-10 Thread Todd O'Bryan
On Tue, 2007-04-10 at 22:21 +, Dave wrote: > I could add to the Context object in each view, but that's a lot of > repeat code (urgh). Also, if I were to take that route, I'd need the > Model to be available between multiple apps within a project and I've > not seen how to do that. You want

Programming Career For You

2007-04-10 Thread Samatha
Find Your Programming Job Vacancy and resources here --> http://www.jobbankdata.com/job-programming.htm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Simple python question

2007-04-10 Thread Grupo Django
I know this is not the right place for asking about python, but it's a simple question. I need to load an object given in a string. Example: #I have a class called foo class foo: def Hello(): return "Hello World" object = 'foo' print object.Hello() Something like this. Is it

Global model/view best practice help

2007-04-10 Thread Dave
Hi all, (firstly, sorry for the subject, couldn't think how to summarize this well) I'm wondering what the best practice is for what I'm looking to do. All thoughts and pointers to where in Django in much appreciated: I want a model that I can use directly in the template. The data needs to

Re: media urls in templates

2007-04-10 Thread James Bennett
On 4/10/07, Udi <[EMAIL PROTECTED]> wrote: > You can create a custom context processor that fetches the base media > url from your settings file and makes it available to the templates. I haven't yet officially "released" it, but I've been working on a small application which bundles a lot of

Re: media urls in templates

2007-04-10 Thread Udi
You can create a custom context processor that fetches the base media url from your settings file and makes it available to the templates. Check this out: http://www.b-list.org/weblog/2006/06/14/django-tips-template-context-processors On Apr 4, 11:02 am, "akonsu" <[EMAIL PROTECTED]> wrote: >

Re: SelectMultiple widget

2007-04-10 Thread Enrico
Hi, There is a 'YOUR_ADMIN_MEDIA/js/SelectFilter2.js' file, I think this is the file that does the "magic". Maybe you can use it as a base for applying the widget on your site. Best regards, Enrico --~--~-~--~~~---~--~~ You received this message because you

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread aaloy
2007/4/10, James Bennett <[EMAIL PROTECTED]>: > > > Again, it's not terribly hard to write views which return JSON or XML; > integration with form widgets, etc. requires binding to a specific JS > library or rolling our own, and that's not going to happen. > With Django is terribly easy to do

Re: Playing with fixtures and django serializers -> Errors...

2007-04-10 Thread akaihola
Unaware of the new manage.py dumpdata and loaddata commands, I've written a tool (dbpickle.py) for dumping and loading Django databases. I've used it both for moving data from one database engine to another and for migrating schema changes to production databases. I wonder if it would be

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread James Bennett
On 4/10/07, Steve Bergman <[EMAIL PROTECTED]> wrote: > Even after the developer decides upon a javascript library to use, > there is still a lot of boilerplate involved to do common things like > populating one widget based upon what the user selects in another > widget. I often need to

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread Todd O'Bryan
On Tue, 2007-04-10 at 18:11 +, Steve Bergman wrote: > But Django definitely has a preferred ORM and a preferred templating > engine. Why be so set on complete agnosticism when it comes to > javascript? > I agree. I don't have time to weigh the benefits of various libraries. As someone

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread Deryck Hodge
On 4/10/07, Steve Bergman <[EMAIL PROTECTED]> wrote: > And, OK, I'll fess up and say that I want to think in python and not > have to switch gears back and forth between python and javascript. ;-) To me, for all the other arguments people make, this is the real issue: wanting to avoid writing

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread Steve Bergman
To me, that does not seem very DRY. Even after the developer decides upon a javascript library to use, there is still a lot of boilerplate involved to do common things like populating one widget based upon what the user selects in another widget. I often need to populate one widget based upon

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread Adam Findley
James Bennett wrote: > On 4/10/07, erdong ma <[EMAIL PROTECTED]> wrote: >> I do not know if a decision has been made on the ajax framework in 1.0. > > Django will not bundle any JavaScript library or provide integration > hooks with any specific library; Django will continue to make it easy > to

Re: Integrating Jasper reports / Reporting in general ??

2007-04-10 Thread gordyt
Joel I recently went through the same process; that is, I migrated from a Java application, using JasperReports to a Python/Django application using ReportLab. It took a bit to get my head around ReportLab, but end the end it has worked out very nicely. --gordon

Re: Updating Django .95 -> .96 on Mac

2007-04-10 Thread Jay Parlar
On 4/10/07, brian mckinney <[EMAIL PROTECTED]> wrote: > > Thanks Jay, this worked perfectly. > > Can anyone shed some light on the purpose of the easy-install.pth > file? Is this just adding django to the system path? Very briefly: There is a large movement in the Python community to move

Re: Updating Django .95 -> .96 on Mac

2007-04-10 Thread Joseph Heck
I found the same thing - easiest solution is to remove the old egg. I had to do this on all the systems (Linux, Win32, and Mac) when we upgraded from 0.95 to 0.96. If you're unsure where it's stashed, run python interactively and use the following the find out: import sys import pprint

Re: Updating Django .95 -> .96 on Mac

2007-04-10 Thread Jeremy Dunck
On 4/10/07, brian mckinney <[EMAIL PROTECTED]> wrote: > > Thanks Jay, this worked perfectly. > > Can anyone shed some light on the purpose of the easy-install.pth > file? Is this just adding django to the system path? It's part of setuptools: http://peak.telecommunity.com/DevCenter/EasyInstall

Re: newb: Sending Request to Django Dev Server, From Python Terminal

2007-04-10 Thread johnny
urllib2 module is the one I need. Thank you. --~--~-~--~~~---~--~~ 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,

Re: Updating Django .95 -> .96 on Mac

2007-04-10 Thread brian mckinney
Thanks Jay, this worked perfectly. Can anyone shed some light on the purpose of the easy-install.pth file? Is this just adding django to the system path? On Apr 10, 8:56 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > Which directory does the .egg file and the 'django' directory live? >

Re: How can I get stored information into a particular format? json, yui, django

2007-04-10 Thread James Bennett
On 4/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm pretty new to Django... At the moment, I'm trying to get all of > the information stored in a database table into a format acceptable > for some javascript I plan to run (using the YUI libraries). django.core.serializers contains

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread James Bennett
On 4/10/07, erdong ma <[EMAIL PROTECTED]> wrote: > I do not know if a decision has been made on the ajax framework in 1.0. Django will not bundle any JavaScript library or provide integration hooks with any specific library; Django will continue to make it easy to receive AJAX requests and send

sort values in a drop down

2007-04-10 Thread Benedict Verheyen
Hi, i have an application that uses oldforms. A model has a foreignkey to a Patients model. Now the users want the patients to be sorted by roomnumber. The roomnumber is specified in another model called room. I have a custome Manipulator so i thought i could change the fields that are shown

Re: Detect ajax request

2007-04-10 Thread Tim Chase
> Is there a standard way to detect if a request was an ajax one? I > know I could append a key to the ajax request like in Mr. Bennett's > post here: > > http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1 > > ie http://website.com/some/request/?xhr and in my view,

Re: Detect ajax request

2007-04-10 Thread limodou
On 4/10/07, Ryan Kanno <[EMAIL PROTECTED]> wrote: > > I've searched Googs and this group for an answer to the following > question: > > Is there a standard way to detect if a request was an ajax one? I > know I could append a key to the ajax request like in Mr. Bennett's > post here: > >

Re: Updating Django .95 -> .96 on Mac

2007-04-10 Thread Jay Parlar
Which directory does the .egg file and the 'django' directory live? /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ ? If so, there should also be a file called easy-install.pth in that directory. Open up that file, and you'll see a reference to the .egg file.

Re: generic views 'extra_context' value via function call utility

2007-04-10 Thread Martin J Hsu
On Apr 10, 4:26 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > > It complicates the implementation, and, as you noted, slows down > slightly for all existing use cases of a callable. > > This isn't a problem in and of itself, except that the only benefit > you get for the complexity and

Detect ajax request

2007-04-10 Thread Ryan Kanno
I've searched Googs and this group for an answer to the following question: Is there a standard way to detect if a request was an ajax one? I know I could append a key to the ajax request like in Mr. Bennett's post here:

Negative numbers comparison bug(?)

2007-04-10 Thread Ryan
Hi, I am currently making a mashup of the Weather Channel's RSS feeds (temperature and wind speed data) and Google maps with Django. Briefly it puts weather data on a map, e.g. sunny in London, rain in Edinburgh. I am having problems with comparing longitudes and latitudes in the database when

Re: SelectMultiple widget

2007-04-10 Thread masuran
Hey Enrico, I already tried that, I can't see anything special about the code in the admin page. On 10 apr, 14:21, "Enrico" <[EMAIL PROTECTED]> wrote: > Hi! > > The widget is almost the same as your "blank listbox" but with a > little Javascript. > > Take a look at the admin page source, it may

Re: FileFiled and save_FIELD_file()

2007-04-10 Thread [EMAIL PROTECTED]
I would be very interested by that feature. Storing all the files in the same upload directory clearly doesn't scale at all! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

model inheritance

2007-04-10 Thread Grupo Django
Hi! I need to create a custom user profile, and I was going to do it as James said in his blog [1], but first I'd like to know how is the model inheritance going. Is still the James way the best way to do it? Thank you. [1]

Re: How can I get stored information into a particular format? json, yui, django

2007-04-10 Thread lagrimas175
By the way, this is the particular javascript I would like to use: http://developer.yahoo.com/yui/examples/datatable/inlineediting.html -- I want to store my data and then have that data outputted so that I can run that javascript code. Any suggestions?

How can I get stored information into a particular format? json, yui, django

2007-04-10 Thread lagrimas175
I'm pretty new to Django... At the moment, I'm trying to get all of the information stored in a database table into a format acceptable for some javascript I plan to run (using the YUI libraries). I need it to be in a format that looks like this: YAHOO.example.Data.inventory = [

Re: generic views 'extra_context' value via function call utility

2007-04-10 Thread Russell Keith-Magee
On 4/10/07, Martin J Hsu <[EMAIL PROTECTED]> wrote: > > On Apr 10, 12:26 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> > wrote: > > What you are proposing would complicate the convenience mechanism of > > allowing simple callables in extra_context, in the name of duplicating > > functionality

Re: Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread Marc Fargas Esteve
Hi Erdong, If you do a simple search for "AJAX" on this group you'll find the answer you're looking for, in brief: Django **will not** advocate for a specific ajax framework/library it provides useful tools to ease your development i.e. Serializers but as jacob sais a few days ago: "why should you

Which ajax framework django will support in the upcoming 1.0, prototype/dojo/jquery?

2007-04-10 Thread erdong ma
I do not know if a decision has been made on the ajax framework in 1.0. Anyone knows some message about this. By the way, how about the Eclipse + pydev comparing with the Wing IDE? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Django scaling and Database replication

2007-04-10 Thread kemuri
On Apr 10, 3:38 am, Merric Mercer <[EMAIL PROTECTED]> wrote: > James, > > The issue with Cluster is that it is designed to work synchronously. > This is fine when the all the DB is on a fast, local network but not > when the DB needs to be replicated to geographically different networks, > where

Re: generic views 'extra_context' value via function call utility

2007-04-10 Thread Martin J Hsu
google groups gobbled my response and I don't see it...sorry if this turns out to be a repost. On Apr 10, 12:26 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/10/07, Martin J Hsu <[EMAIL PROTECTED]> wrote: > > > > > I saw this as a minor inconsistency in how settings are defaulted.

SelectMultiple widget

2007-04-10 Thread masuran
Hello everyone, The admin interface has the most wonderful SelectMultiple widget that you can have with a ManyToMany Field. You know, the one with the two listboxes where you can transfer an item from the left to the right. Does anyone know how you can use this widget in your own forms? I can

Re: Performing an action on first-save for models with a OneToOneField

2007-04-10 Thread Jarek Zgoda
Benjamin Slavin napisaƂ(a): > I'm currently trying to perform an action the first time an object is > saved for a model that includes a OneToOneField. > > Normally I'd use the old "check self.id before save" approach, but > models with OneToOneFields don't provide that option (they don't have >

Re: Bad SQL when ordering a model by related models

2007-04-10 Thread Atilla
> - structure/models.py > class Issue(models.Model): > (...) > pub_date = models.DateField('Publication date', unique=True) > (...) > > class Meta: > ordering = ['-pub_date'] > - > > - stories/models.py > class Story(models.Model): > (...) > issue =

Re: Django Set HTTP Error manually

2007-04-10 Thread Ivan Sagalaev
johnny wrote: > What I want to do is set HTTP Error manually in my view, when a > request is made to certain url, without post data. > > At a particular url, my view is looking for XML document to be sent > over http, by post. If a request come in without post, I want to > raise an error "405