Re: Select Box filter

2006-07-24 Thread Seth Buntin
I guess what I don't understand is the "hook" part. How do I change the onChange event for the auto-generated field in the admin area? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Search Engine for Python and Django

2006-07-24 Thread nkeric
[EMAIL PROTECTED] wrote: > pyLucene: no docs, SWIG/Java like api (not nice) quote from pylucene's page: As of release 2.0, SWIG is no longer used. The Python wrapper objects are implemented by hand using the Python C Type System for better integration with Python and for faster C++/Java access.

Re: Select Box filter

2006-07-24 Thread Umbrae
You can include javascript files to admin pages using the 'js' field in class Admin in your model. Using javascript, you could presumably hook into the onChange of the first select box and do your filtering. HTH, Chris Dary Web Developer Carthage College http://www.carthage.edu/webdev/ Seth

Select Box filter

2006-07-24 Thread Seth Buntin
I was wondering if anyone has found a way to filter a select box depending on the value of another select box. This is really easy with javascript but I want to use the admin module. Any suggestions? --~--~-~--~~~---~--~~ You received this message because you

Re: Search Engine for Python and Django

2006-07-24 Thread Alan Trick
It would be nice if it could be more native, but a qick solution would be to use pdf2html and wvHtml and then parse the results. That's what most other people do. Alan Trick On Mon, 2006-07-24 at 06:14 -0700, Vizcayno wrote: > It was the third I explored also, I made a question in the mailing >

Re: Search Engine for Python and Django

2006-07-24 Thread Vizcayno
Rik But Xapwrap depends on pyLucene to work. I really would like an integrated solution, such as Django is. I continue with my pilgrimage. Many thanks really. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Lost in forms

2006-07-24 Thread Darryl Caldwell
Anna,did you try adding your object from the command line? Using the interactice session?-dOn 7/24/06, toth anna < [EMAIL PROTECTED]> wrote:I have lost in form processing while learning django. I need to create a simple object (say 'product') with somebasic validation (required fields, +minimal

Re: Search Engine for Python and Django

2006-07-24 Thread Vizcayno
Hi Wade: Thanks for the information. Do not have the sensation that nxlucene is an isolated effort? isn't it better to join forces with pyLucene? Do you think this solution would apply to Django? Thanks again!! --~--~-~--~~~---~--~~ You received this message

Re: Blank page for admin

2006-07-24 Thread Vixiom
ok I upgrade expat so apache's and python's match. no more segement errors but my resource usage still goes throught the roof when I try to load a page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

have urlpatterns in urls.py changed?

2006-07-24 Thread cyberco
Using Django .95 I'm trying to create a simple view based on the examples in tutorial 3, but somehow things don't work. The syntax of the examples is also different than what's in urls.py. Is there any updated documentation somewhere? --~--~-~--~~~---~--~~ You

Exception adding a FileField

2006-07-24 Thread cyberco
I'm trying to add a FileField to one of my models, but I keep getting an exception whenever I try to open the admin page. The code is: class Test(models.Model): fileUploadField = models.FileField(upload_to='tmp/', core=True) The stacktrace is below.

Re: Search Engine for Python and Django

2006-07-24 Thread Wade Leftwich
Solr does look good. I'm checking it out along with NXLucene (http://www.cps-project.org/sections/projects/nxlucene) , which is a similar architecture (search server with an XML API), built with pyLucene and Twisted. -- Wade Leftwich Ithaca, NY

Re: Blank page for admin

2006-07-24 Thread Vixiom
I've (unfortunatly) found the cause of the problem, at first python through MySQLdb wasn't hooking up with the database. Just as a test I installed SQLite, which was a chore and a half because of Tcl errors, anyways I installed SQLite synced the db and then went to try the admin page again. This

Re: Blank page for admin

2006-07-24 Thread Paulo
You can also tunnel into your server and forward port 8000. I do this when I am building/testing things on my server: %: sudo ssh -L 8000:localhost:8000 [EMAIL PROTECTED] Then just fire up "http://localhost:8000; in your fave web browser. On 7/24/06, Kenneth Gonsalves <[EMAIL PROTECTED]>

Lost in forms

2006-07-24 Thread toth anna
I have lost in form processing while learning django. I need to create a simple object (say 'product') with some basic validation (required fields, +minimal logic), but after filling a form and submit it everything looks ok but the object does not get saved and nothing is checked. (generic create

Re: Search Engine for Python and Django

2006-07-24 Thread [EMAIL PROTECTED]
pyLucene: no docs, SWIG/Java like api (not nice) divmod Xapwrap: pythonish api for Xapian -> Lucene, pooor docs hype: SVN only, no docs (?) postgresql: tsearch2, open-fts: old releases I'm testing Xapwrap now :) --~--~-~--~~~---~--~~ You received this message

Re: Getting foreign relationship data in views

2006-07-24 Thread andyhume
Thanks Martin - the example apge is helpful. All I'm trying to do though is have the data from instruments available as attributes of the client object. eg, client.instrument.name. Is that the correct syntax? Andy. --~--~-~--~~~---~--~~ You received this

Re: Search Engine for Python and Django

2006-07-24 Thread Vizcayno
Nkeric: I am evaluating this option now. It seems to be the only one and good alternative for pyhton. Best regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Can I use an __init__ method on a model ?

2006-07-24 Thread [EMAIL PROTECTED]
What are you trying to do (more the reason for wanting to have an init method)? Would something like: http://www.djangoproject.com/documentation/models/properties/ help? Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: TEMPLATE_CONTEXT_PROCESSORS

2006-07-24 Thread Ian Clelland
On 7/24/06, Rares Vernica <[EMAIL PROTECTED]> wrote: > The goal is to have request.META.PATH_INFO in templates. > > The problem is that TEMPLATE_CONTEXT_PROCESSORS does not seem to make > any difference. request is still not accessible from template. Even is > I > set the variable to () nothing

TEMPLATE_CONTEXT_PROCESSORS

2006-07-24 Thread Rares Vernica
Hi, I added this to my settings.py: TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.request', 'django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', ) I took it from the second comment from here:

Re: Can I use an __init__ method on a model ?

2006-07-24 Thread James Bennett
On 7/24/06, Ruben <[EMAIL PROTECTED]> wrote: > But I want the init-method to run always, similar to __init__. Lets > name it "myInit()". There are a lot of ways to obtain a model instance: Have you looked at this: http://code.djangoproject.com/wiki/DevModelCreation to get a feel for how Django

Re: Can I use an __init__ method on a model ?

2006-07-24 Thread Ruben
Hm. I could use such a CustomManager, and create models via: XXX.objects.createObject(). But I want the init-method to run always, similar to __init__. Lets name it "myInit()". There are a lot of ways to obtain a model instance: XXX.objects.filter(...).all() or XXX.objects.get(...), and so

Re: Blank page for admin

2006-07-24 Thread Kenneth Gonsalves
On 24-Jul-06, at 8:58 PM, Vixiom wrote: > It's VPS hosting so I'm not sure where the dev server would (or even > could) be viewed from? lynx or links in a shell on the server -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/

Re: Blank page for admin

2006-07-24 Thread Vixiom
It's VPS hosting so I'm not sure where the dev server would (or even could) be viewed from? I tried mydomain.com:8000 and IPaddress:8000 neither of those came up --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-24 Thread Jacob Kaplan-Moss
On Jul 24, 2006, at 6:03 AM, James Bennett wrote: > That'd probably be a good idea; I remember being somewhat befuddled > when I wrote up my "how Django processes a request" at not being able > to find anything that checked whether the return value from the view > (or middleware, if that's what

Re: Related objects in generic views

2006-07-24 Thread sean
Thanks for the reply. That solution would involve the object_detail view for the folder, right? I am currently using that one, but pagination would be nice to use on the media list, so I would rather get the object_list working. I don't think I completely understand the queryset parameter. In

Re: simplejson & umlauts

2006-07-24 Thread patrickk
that röcks, thank you very much. Am 24.07.2006 um 14:44 schrieb Simon Willison: > > On 24 Jul 2006, at 12:21, patrickk wrote: > >> has anyone ever used simplejson with umlauts? >> I´m reading a title from a blog-entry which has umlauts and they are >> not displayed correctly. > > I doubt this

Re: Search Engine for Python and Django

2006-07-24 Thread Vizcayno
It was the third I explored also, I made a question in the mailing list, it is pending of answer. I want to know if the tool can index and search over .doc files and .pdf files. By now, seems it only works on .txt, .html and other format that is characteristic of hyperestraier. Thanks for your

Re: Custom Manipulator SelectField "blank" option

2006-07-24 Thread [EMAIL PROTECTED]
One nice thing about doing it the way it currently is that you can specify what yuo want the "blank" to be, e.g. "Please select an option" or "", etc. Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: FileField problems. uplaoded files overwritten

2006-07-24 Thread Gacha
I got the same problem :( edit inline doesn't work propertly --~--~-~--~~~---~--~~ 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

Re: How to read parameters

2006-07-24 Thread Martin Robinsson
You might want to consult this page: http://www.djangoproject.com/documentation/request_response/#examples Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Can I use an __init__ method on a model ?

2006-07-24 Thread [EMAIL PROTECTED]
Take a look at the user object and user manager: http://code.djangoproject.com/browser/django/trunk/django/contrib/auth/models.py There is the method: create_user(self, username, email, password) Probably the best way of doing what you want to do is by doing a similiar method using the manager.

Re: Blank page for admin

2006-07-24 Thread [EMAIL PROTECTED]
If you use the dev server "python manage.py runserver", does the admin page show up then? http://localhost:8000/admin -Alen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: about row level permissions

2006-07-24 Thread [EMAIL PROTECTED]
Hi, I'm the developer working on that branch. I've had some personal issues come up that haev delayed me from committing the latest code for row level permissions. Which is required to work with the wiki article. One thing to note, is that they don't do anything at this current point. You can

Re: How to read parameters

2006-07-24 Thread PythonistL
>From outside but also can be sent from inside Django application --~--~-~--~~~---~--~~ 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

Re: simplejson & umlauts

2006-07-24 Thread Simon Willison
On 24 Jul 2006, at 12:21, patrickk wrote: > has anyone ever used simplejson with umlauts? > I´m reading a title from a blog-entry which has umlauts and they are > not displayed correctly. I doubt this is a problem with simplejson; it seems to handle unicode characters just fine. I imagine you

Re: Related objects in generic views

2006-07-24 Thread Malcolm Tredinnick
On Mon, 2006-07-24 at 11:41 +, sean wrote: > Hi, > I'm having a hard time getting the generic list view to work for a set > of related objects. > I have two models, Folder and Media, where Media has a foreign key > relationship to Folder. I want to use generic views to access all the > media

How to read parameters

2006-07-24 Thread PythonistL
Let's suppose a user click on a URL something like this http://www.server.com/ListTradeLeads/?page=6=admin . So some parameters( page and userId) are sent to the server but how can I find out ,in Django,values of these parameters , that is the page is 6 and userId is admin? I would like to

Related objects in generic views

2006-07-24 Thread sean
Hi, I'm having a hard time getting the generic list view to work for a set of related objects. I have two models, Folder and Media, where Media has a foreign key relationship to Folder. I want to use generic views to access all the media related to a specific folder but I can't seem to get the

simplejson & umlauts

2006-07-24 Thread patrickk
has anyone ever used simplejson with umlauts? I´m reading a title from a blog-entry which has umlauts and they are not displayed correctly. thanks, patrick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Create django application tests environment

2006-07-24 Thread Russell Keith-Magee
On 7/24/06, Xie Yanbo <[EMAIL PROTECTED]> wrote: In fact I wish django release a good built-in test framework likezope3/twisted/etc. Using nose[1] to manage django's tests looks likepretty good. At that moment, we can writing tests file in individual directory `tests` and run command `nosetests'

Re: Create django application tests environment

2006-07-24 Thread Xie Yanbo
On 7/24/06, Alex Dong <[EMAIL PROTECTED]> wrote: > Hi Yanbo, > > Your script works amazingly well but switches between shell and python > is, sometimes, a little annoying on my windows laptop. So I'm wondering > are there any way to run the standard unittest.TestCase against the > django model's

Re: list_display: How to change the label for each field

2006-07-24 Thread [EMAIL PROTECTED]
Thanks guys for your reply. Both of your replies answer my question perfectly. Regards, -Alen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

RFC: Localization (L10N)

2006-07-24 Thread Nebojsa Djordjevic
sorry for cross post. I just want to bring some attention to this thread http://groups.google.com/group/Django-I18N/browse_thread/thread/f33c087fc57fb2bc/44aecc7ee75f676f#44aecc7ee75f676f We currently have great i18n implementation, but not l10n - yes, we have date-aware template filters/tags

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-24 Thread James Bennett
On 7/24/06, Simon Willison <[EMAIL PROTECTED]> wrote: > It would be nice if we could catch this and provide a friendly error > message, maybe by having an assertion somewhere that checks that the > view function has returned an object that is an instance (or > subclass) of HttpResponse. That'd

Re: Best idea?

2006-07-24 Thread PythonistL
Thanks a lot for help L. --~--~-~--~~~---~--~~ 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 [EMAIL

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-24 Thread Simon Willison
On 24 Jul 2006, at 01:17, Jacob Kaplan-Moss wrote: >> Has anybody else seen this error? It's obvious that Http404 doesn't >> have the method, it's just a subclass of Exception. If this is just a >> Django bug, I'll happily post a patch, just want to feel out any >> possible stupidness on my part

Re: AttributeError: class Http404 has no attribute 'has_header'

2006-07-24 Thread Afternoon
Haha! You're quite right. I blame my understudy :-). Thanks for your help Jacob. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: list_display: How to change the label for each field

2006-07-24 Thread Martin Robinsson
Hi Alen Kilian showed how you can change the displayed name of your models. If in addition you want to specify how your fields are displayed please see: http://www.djangoproject.com/documentation/model_api/#verbose-field-names Martin --~--~-~--~~~---~--~~ You

Re: ManyToManyField Usage

2006-07-24 Thread Martin Robinsson
Hi Minglei, Sorry for the digression. At first I thought you only wanted to solve your immediate problem of how to add records to a many-to-many relation to be able to move on. I understand now that you also wonder why one has to specify the album a second time when the objalbum.song_set should

Is this a misuse of SlugField?

2006-07-24 Thread Spider
In the Django tutorial, the URL to display a specific poll is something like polls/, when the is an incrementing number 1,2,3 ... etc. This means the user can easily guess a and manually contruct the URL for it. I'd like to make this more difficult by having the a random string of letters and

Re: list_display: How to change the label for each field

2006-07-24 Thread Kilian CAVALOTTI
On Monday 24 July 2006 11:02, [EMAIL PROTECTED] wrote: > Hi, > > How can one change the label for each field, defined in list_display, > that is to be displayed in the admin page? I have seen the Tutorial02 > that show how to use the was_published_today.short_description="...". > How does one do

list_display: How to change the label for each field

2006-07-24 Thread [EMAIL PROTECTED]
Hi, How can one change the label for each field, defined in list_display, that is to be displayed in the admin page? I have seen the Tutorial02 that show how to use the was_published_today.short_description="...". How does one do the same for the class variables? Regards, -Alen

Re: Getting foreign relationship data in views

2006-07-24 Thread Martin Robinsson
Hi Not sure I completely get your code. If client_search initially is a variable holding a string I assume you're aware that declaring a function with the same name will override the original variable... When you write ´´first_name__icontains=client_search´´, is client_search supposed to hold a

Re: Search Engine for Python and Django

2006-07-24 Thread Laurent Rahuel
Hi, Did anybody give a try to hyperestraier [1] and his python module [2] ? [1] http://hyperestraier.sourceforge.net/ [2] http://hype.python-hosting.com/ Regards, Laurent. Le lundi 24 juillet 2006 05:08, Vizcayno a écrit : > Hi: > Do your have news about the promising MerQuery? > I was

Blank page for admin

2006-07-24 Thread Vixiom
I'm getting a blank page when going to domain.com/testapp/admin, no errors just a blank page (blank as well if you view source). I've tested Django using the manage.py shell and it's working, I've also checked for the admin tables in the database and they're all there. At first I received