Re: Weird error when doing loaddata

2008-11-22 Thread Russell Keith-Magee
On Sun, Nov 23, 2008 at 10:07 AM, Erik Allik <[EMAIL PROTECTED]> wrote: > > Thanks, your suggestion to very carefully check the fixture path led > me to realizing the problem. I wanted to load the service.json file > located in the working directory but loaddata was actually using the > one in

Re: Template tag attribute lookup with abstracted variable

2008-11-22 Thread Andy Young
On Nov 21, 7:03 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > It is deliberate that Django's template language doesn't support > indirect attribute lookup. Helps to keep things simple (part of the > "keep programming out of templates" design goal). You're absolutely right about this, and I

Re: Ordering a ManyToManyField with "through" relation

2008-11-22 Thread Malcolm Tredinnick
On Sat, 2008-11-22 at 04:34 -0800, Benjamin Hell wrote: > Hi! > > I tried to find a solution to the following problem in the > documentation, but without success. I have a model which (simplified > for this problem description) consists of two classes "Collection" and > "Thing", which are

Re: Where are you developing your python?

2008-11-22 Thread Donn
FWIW O/S: Kubuntu Edit: gvim, Firefox + Firebug. Graphics: Inkscape, Gimp, ImageMagick. Testing on: Safari (wine), ies4linux, Opera, FF. server: ssh and rsync from a terminal. Oh, and a whole lotta alt-tab F5'ing :) \d --~--~-~--~~~---~--~~ You received this

How to properly use FilteredSelectMultiple in admin?

2008-11-22 Thread Michael Placentra II
I've made a few attempts at using FilteredSelectMultiple in the admin site...without success... Here they are: http://dpaste.com/hold/92980/ So what's the proper way to do it? What am I doing wrong? --~--~-~--~~~---~--~~ You received this message because you are

Re: Can't get tiny_mce in admin

2008-11-22 Thread Malcolm Tredinnick
On Sat, 2008-11-22 at 18:09 -0800, waltbrad wrote: [...] > # Uncomment the next line to enable the admin: > (r'^admin/(.*)', admin.site.root), > (r'^tiny_mce/(?P.*)$', 'django.views.static.serve', > { 'document_root': 'C:\tinymce\jscripts\tiny_mce' }), The string

Re: order by date.day ?

2008-11-22 Thread Malcolm Tredinnick
On Fri, 2008-11-21 at 21:18 -0800, sajal wrote: > Hi all im new to django(and python) and had to do something in a dirty > way recently. would like to know if there is a more elegant solution. > > I have a model which has lists of people with many fields including > one datetime field called

Can't get tiny_mce in admin

2008-11-22 Thread waltbrad
I'm working with James Bennet's book Practical Django Projects. He puts a tiny_mce text editor into the admin flatpage interface. I have the change_form.html on this path C:\mytemplates\admin\flatpages \flatpage tiny_mce.js is found here: C:\tinymce\jscripts\tiny_mce This is my urls.py:

Re: Weird error when doing loaddata

2008-11-22 Thread Erik Allik
Thanks, your suggestion to very carefully check the fixture path led me to realizing the problem. I wanted to load the service.json file located in the working directory but loaddata was actually using the one in the fixtures subdirectory which was completely outdated. Nevertheless, I think

Re: Weird error when doing loaddata

2008-11-22 Thread Russell Keith-Magee
On Sun, Nov 23, 2008 at 8:09 AM, Erik Allik <[EMAIL PROTECTED]> wrote: > > I'm doing django-admin.py loaddata with a JSON file containing just > [], i.e. an empty fixture, to rule out any possibility of invalid data > being in the fixture, but still getting the following traceback: > >

Weird error when doing loaddata

2008-11-22 Thread Erik Allik
I'm doing django-admin.py loaddata with a JSON file containing just [], i.e. an empty fixture, to rule out any possibility of invalid data being in the fixture, but still getting the following traceback: http://dpaste.com/92961/ The DB schema is in sync with the model definitions. The

Re: Web 2.0 app in django - the admin does everything I need (It seems)

2008-11-22 Thread dash86no
Russ, Cheers for spending the time to write such a great response. When I say "web 2.0", to me that means (at least in this context) that the web page should be an application approaching the level of what one would have traditionally implemented with custom build client applications sitting on

Re: Dynamic columns in admin changelists

2008-11-22 Thread Steve Phillips
For me the #django IRC chat logs have given me much success as a reference point as I am a beginner with django. That search on there for me is a goldmine. Steve On 11/21/08, AndyB <[EMAIL PROTECTED]> wrote: > > I basically would like some way for staff users to choose which > columns are

Re: Using a HTML to fire off a data processing script on the server (REST or SOAP)

2008-11-22 Thread Jeff Anderson
shi shaozhong wrote: > Dear Jeff Anderson, > > Thank you for your email. > > It sounds very interesting to me. I must confess that I am not a > programmer, and have no experience with Django. But I have a project > in hand to do such a work. > > Have you ever tried to use feedback.py to fire

Re: "Segmentation Fault" (mod_python) and "incomplete headers (0 bytes)..." (FastCGI)

2008-11-22 Thread neek
> I highly reccomend you to switch to psycopg2 2.0.8 > After I did a switch to this version, I haven't seen any segmentation > faults since 30 september 2008 (earlier I had them every few days). Ys! It works! After I'd updated psycopg to version 2.0.8 the problem just disappeared! It seems

Receiving xml via HTTP POST

2008-11-22 Thread chefsmart
Hi All, I am creating an Adobe AIR application that will interact with my Django app. I am currently trying out django-rest-interface that can be found on googlecode. However, there's too much behind-the-scenes stuff django-rest-interface (for the little amount of knowledge I have) and I need

Re: unicode cipher & generic views

2008-11-22 Thread Alex Koshelev
Hi, Oleg! Show your code to us. Problem is where. On 11/22/08, oleg <[EMAIL PROTECTED]> wrote: > > Hi there! I'm brand new user of django.. So, please, don`t be ugly, > if I`m missing something elementary ^_^ > > I use django.views.generic.create_update to generate an editing/ > inserting form

Re: Keeping fields out of the Admin

2008-11-22 Thread Peter Rowell
On Nov 21, 10:58 am, maeck <[EMAIL PROTECTED]> wrote: > Please note that the result of this is that if you use > 'editable=False' this field is not visible in the admin at all. > As far as I know there is no good way (see below) of putting read only > data in an admin page. The world is strange.

Re: Using a HTML to fire off a data processing script on the server (REST or SOAP)

2008-11-22 Thread shi shaozhong
Dear Jeff Anderson, Thank you for your email. It sounds very interesting to me. I must confess that I am not a programmer, and have no experience with Django. But I have a project in hand to do such a work. Have you ever tried to use feedback.py to fire off another Python script (external

Re: Web 2.0 app in django - the admin does everything I need (It seems)

2008-11-22 Thread Russell Keith-Magee
On Sat, Nov 22, 2008 at 10:27 PM, dash86no <[EMAIL PROTECTED]> wrote: > > So my question is, can I expect building forms using the templates/ > views to be as simple as getting things up in the admin. Will using views, forms and templates be as simple as configuring the built-in admin site - of

Re: Problem with i18n in tests

2008-11-22 Thread Karen Tracey
On Sat, Nov 22, 2008 at 6:52 AM, Florencio Cano <[EMAIL PROTECTED]>wrote: > Hi! > I'm testing a Django application where I'm using i18n. > The problem is with a test that says that a word with an accent > (spanish) is the same as a word without an accent. And although I have > established my own

Re: Problem with i18n in tests

2008-11-22 Thread Ramiro Morales
On Sat, Nov 22, 2008 at 9:52 AM, Florencio Cano <[EMAIL PROTECTED]> wrote: > Hi! > I'm testing a Django application where I'm using i18n. > > [...] > > FAIL: test_agregar_responsable_nombre_duplicado_tildes > (gesfich.fichlopd.tests.RegistrarUsuariosTestCase) >

Web 2.0 app in django - the admin does everything I need (It seems)

2008-11-22 Thread dash86no
I've just finished going through the Django documentation up the the point that i've build a models.py and an admin.py. I've been ignoring the example (the web poll thing) and doing my own project, which as it happens is a quotation generating app. My inspiration is SugarCRM but I'm actually not

order by date.day ?

2008-11-22 Thread sajal
Hi all im new to django(and python) and had to do something in a dirty way recently. would like to know if there is a more elegant solution. I have a model which has lists of people with many fields including one datetime field called date_of_birth I need to show a list of people whose birthday

Re: Keeping fields out of the Admin

2008-11-22 Thread trodrigues
On Nov 21, 6:58 pm, maeck <[EMAIL PROTECTED]> wrote: > Please note that the result of this is that if you use > 'editable=False' this field is not visible in the admin at all. > As far as I know there is no good way (see below) of putting read only > data in an admin page. > > You could however,

Ordering a ManyToManyField with "through" relation

2008-11-22 Thread Benjamin Hell
Hi! I tried to find a solution to the following problem in the documentation, but without success. I have a model which (simplified for this problem description) consists of two classes "Collection" and "Thing", which are related through a "Membership" class using the "through=" keyword. The

Re: dynamic method calling

2008-11-22 Thread Steve McConville
> On Sat, Nov 22, 2008 at 2:38 AM, Chris <[EMAIL PROTECTED]> wrote: >> Hello everyone, >> I have a quick python question. Is they a better way of calling a >> method dynamically then what I have below? Is there a more elegant >> approach? Thanks in advance. >> try:

unicode cipher & generic views

2008-11-22 Thread oleg
Hi there! I'm brand new user of django.. So, please, don`t be ugly, if I`m missing something elementary ^_^ I use django.views.generic.create_update to generate an editing/ inserting form from the Model. In Model I have a StringProperty which value could be chosen from the set of possible

Problem with i18n in tests

2008-11-22 Thread Florencio Cano
Hi! I'm testing a Django application where I'm using i18n. The problem is with a test that says that a word with an accent (spanish) is the same as a word without an accent. And although I have established my own error messages it shows other error message when using a word with accents. The

Re: dynamic method calling

2008-11-22 Thread Ivan Sagalaev
Ivan Sagalaev wrote: > if hasattr(self, 'get_%s_content' % self.name): > raise Exception('Method does not exists') Typo: there should be `if not hasattr`, obviously. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: dynamic method calling

2008-11-22 Thread Ivan Sagalaev
Chris wrote: > try: > push = getattr(self, 'get_%s_content' % self.name) > except AttributeError: > raise "Method does not exist" > if callable(push): > push(**argv) There are a couple of problems with this code. 1. It's more readable to call hasattr than to catch an exception from

Re: dynamic method calling

2008-11-22 Thread Horst Gutmann
AFAIK no (except for perhaps some different exception handling but getattr is IMO the way to go), but what don't you like about this approach? -- Horst On Sat, Nov 22, 2008 at 2:38 AM, Chris <[EMAIL PROTECTED]> wrote: > Hello everyone, > I have a quick python question. Is they a better way of

Problem with django tagging: how to add tags??

2008-11-22 Thread mwebs
Hi there, I am using django tagging and have problems adding tags to an object. There are 2 methods that enable adding a tag: - add_tag() - update_tags() -- for tag in parse_inputs(form.cleaned_data['tags']): Tag.objects.add_tag(tag)

Re: Custom Select widget choices - how to reuse choices?

2008-11-22 Thread Donn
On Saturday, 22 November 2008 03:52:27 Jeff FW wrote: > choices = Movie._meta.get_field('disk_type').choices Ah, the 'Movie' in there was the missing voodoo. I was stuck on using an instance; and yes, I prefer Movie dot choices 'global' idea. Thanks for the various replies. I have more-or-less