Re: custom form with admin look and feel

2008-07-05 Thread chefsmart
@Ayaz: I tried what you suggested, but the alignment of fields etc goes off for me. Is it possible for you to post an example django template, maybe on dpaste.com. Also I don't quite understand where all the javascript in the change_form is coming from.. On Jun 30, 8:29 pm, Ayaz Ahmed Khan <[EM

Re: MySQL Errors Using syncdb

2008-07-05 Thread Arif
Thanks for your reply but I don't think it is a problem with the models, the same scripts work on my old Windows machine on localhost, and the scripts work on my production linux server. I have only had this problem since I installed Django on my new Macbook Pro, sorry I should have mentioned tha

Errorlist messages internalization/localization

2008-07-05 Thread Florencio Cano
Hi! In my app when I show the errors in errorlist because a wrong filled form it shows them in spanish (my language) but when I execute the tests (with assertContains) the messages in errorlist appear in english! How can I fix this? --~--~-~--~~~---~--~~ You receiv

Re: Errorlist messages internalization/localization

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 12:15 +0200, Florencio Cano wrote: > Hi! > In my app when I show the errors in errorlist because a wrong filled > form it shows them in spanish (my language) but when I execute the > tests (with assertContains) the messages in errorlist appear in > english! > How can I fix t

Re: Errorlist messages internalization/localization

2008-07-05 Thread Florencio Cano
I had 'es_ES'. I have reviewed http://www.i18nguy.com/unicode/language-identifiers.html and I see that for spanish (Spain) I have to use 'es-ES' so I change it, execute manage.py syndb and execute the tests but I get the same. Now I try with 'es'. The same process and I get the same...Could be the

Re: Errorlist messages internalization/localization

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 12:42 +0200, Florencio Cano wrote: > I had 'es_ES'. I have reviewed > http://www.i18nguy.com/unicode/language-identifiers.html and I see > that for spanish (Spain) I have to use 'es-ES' Well, that's some draft document with no actual standing. Django uses the HTTP header v

Django based CMS

2008-07-05 Thread Fernando Rodríguez
Hi, Is there any open source django based cms you would recommend? Th eonlyone I've seen so far is PyLucid. What else is there? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Failure to compile urls.py on startup

2008-07-05 Thread zobbo
I've been working through "Practical Django Projects" by James Bennet. I came across some unexpected behaviour which I wanted to share regarding handling errors on startup within the urls configuration. In the weblog application he talks you through, he discusses splitting up urls.py into modules

Re: Failure to compile urls.py on startup

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 04:35 -0700, zobbo wrote: [...] > Comments welcomed. I'm not likely to make the same mistake again but > interested to know if there's a solution for this. Besides the obvious > "Don't ignore error messages" :) If there's not already a ticket open for this in Trac (do a bit

Re: syncdb

2008-07-05 Thread Peter Melvyn
On 7/5/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Thanks a lot!! I am used to rails. Hopefully django will have some > sort of db migrate ability in the future. Django has a separated project http://code.google.com/p/django-evolution/ for such task Peter --~--~-~--~~---

Re: newsletter in django

2008-07-05 Thread sebey
ok I have been recomened mailman so I will have a look thanks On Jul 3, 3:16 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote: > sebey wrote: > > I am planning on making a newsletters so should I use django build-in > > options or mailman or something else you would recomenmt > > I recommend mailman.

Re: non editable admin model

2008-07-05 Thread Bobby Roberts
anyone know if this can be done without modifying the actual django installation on the server. Surely it can be done through passing settings to the admin in the model or a settings in the settings file but I can't find any documentation on it. BR --~--~-~--~~~---~--

Django and XML

2008-07-05 Thread Bobby Roberts
Can Django interact with XML or would it be a view i write that does it? I'm putting in the last place of a payment gateway and need to know which direction to take. Thanks in advance BR --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Another error

2008-07-05 Thread lukas
On Fri, 4 Jul 2008 20:01:29 -0700 (PDT), Leaf <[EMAIL PROTECTED]> wrote: > > I really need to stop making assumptions about Python. Again, I > assumed that the parameters wouldn't be case-sensitive. Most of my > programming experience has been in BASIC and PHP, which aren't quite > as picky. Th

Re: syncdb

2008-07-05 Thread Kenneth Gonsalves
On 05-Jul-08, at 5:32 PM, Peter Melvyn wrote: >> Thanks a lot!! I am used to rails. Hopefully django will have some >> sort of db migrate ability in the future. > > Django has a separated project > http://code.google.com/p/django-evolution/ for such task it is a third party project -- re

Re: "Eval" in templates?

2008-07-05 Thread Ben Kovitz
Thanks for the encouragement, Alex. This was so easy, it should be a first lesson in how to write a custom tag. It took about 15 minutes and worked the first time! from django import template register = template.Library() @register.tag(name="eval") def do_eval(parser, token): try: t

Re: "Eval" in templates?

2008-07-05 Thread Ned Batchelder
Now that you have an eval tag, maybe you don't need this, but I think Django already had a simpler solution to your problem: Context: buttonDecidedAtRunTime: 'button4.html' thisPage: "/some/path" blah.html: {% include buttonDecidedAtRunTime %} The argument to the include tag doesn't

Re: Django based CMS

2008-07-05 Thread Bobby Roberts
> Is there any open source django based cms you would recommend?  Th > eonlyone I've seen so far is PyLucid. What else is there? I'm a noob but won't installing flat pages handle that for you? --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Django based CMS

2008-07-05 Thread Milan Andric
On Sat, Jul 5, 2008 at 6:09 AM, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > > Hi, > > Is there any open source django based cms you would recommend? Th > eonlyone I've seen so far is PyLucid. What else is there? > > Thanks! There's a couple of them available on code.google.com and elsewhere

Re: MySQL Errors Using syncdb

2008-07-05 Thread Karen Tracey
On Sat, Jul 5, 2008 at 3:03 AM, Arif <[EMAIL PROTECTED]> wrote: > Thanks for your reply but I don't think it is a problem with the > models, the same scripts work on my old Windows machine on localhost, > and the scripts work on my production linux server. > > I have only had this problem since I

Re: Type error: Cannot resolve keyword 'name' into field

2008-07-05 Thread roj
the following link might be helpful http://django.freelancernepal.com/topics/errors/ Cheers! On Jul 4, 11:02 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm having troubles with an admin portion. I am brand new at django, > so any help would be greatly appreciated. I am trying to make a

Re: Copyright issues for an application developed using django, python and mySQL

2008-07-05 Thread Nagu
Thank you again. I will start a discussion with our company lawyers regarding this. On Jul 4, 7:21 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-07-04 at 19:03 -0700, Nagu wrote: > > Thank you very much for your explanations. From the above > > explanations, I can infer that I

Re: MySQL Errors Using syncdb

2008-07-05 Thread Arif
Karen, You were spot on it was an error in the models file, thank you so so much! Very much appreciated. On Jul 5, 5:45 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Jul 5, 2008 at 3:03 AM, Arif <[EMAIL PROTECTED]> wrote: > > Thanks for your reply but I don't think it is a problem with

escaping

2008-07-05 Thread Bobby Roberts
I'm trying to escape something printed back to a template as follows {{request.session['AccountNum'] | escape }} and i'm getting this error: Could not parse the remainder: ' | escape' from 'request.session.AccountNum | escape' >From what I can tell i'm using the right syntax... am I missing

Re: escaping

2008-07-05 Thread Horst Gutmann
Already tried it without the extra spaces? {{ request.session.AccountNum|escape }} MfG, Horst On Sat, Jul 5, 2008 at 10:13 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > I'm trying to escape something printed back to a template as follows > > > {{request.session['AccountNum'] | escape }} > > a

Issue with django-tagging 0.3 (svn) with models definition

2008-07-05 Thread Nicolas Steinmetz
Hello, Despite I read a lot of time the overview.txt on the django tagging svn repository, I still can't stand how to use it at my model's level. I'm quite new to python and may miss some elements. When diving into the register part, it says it requiers a field for tag which is supposed to be "t

Issue with setting up FastCGI

2008-07-05 Thread TBS
I'm getting this problem: [EMAIL PROTECTED]:~/wiggle$ ./manage.py runfcgi WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! WSGIServer: missing FastCGI

Re: non editable admin model

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 06:16 -0700, Bobby Roberts wrote: > anyone know if this can be done without modifying the actual django > installation on the server. Surely it can be done through passing > settings to the admin in the model or a settings in the settings file > but I can't find any documen

Re: Django and XML

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 06:17 -0700, Bobby Roberts wrote: > Can Django interact with XML or would it be a view i write that does > it? I'm putting in the last place of a payment gateway and need to > know which direction to take. Your question is ambiguous. Interact how? Django's view functions

raising HttpResponseBadRequest throws Exception Type error?

2008-07-05 Thread Rob Hudson
In my code for an API it made sense to me to import and raise `HttpResponseBadRequest ` when the API was given bad data to work with. I'm importing and raising the error like this: from django.http import Http404, HttpResponseBadRequest raise HttpResponseBadRequest, "Invalid data" But w

Re: raising HttpResponseBadRequest throws Exception Type error?

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 18:58 -0700, Rob Hudson wrote: [...] > * Shouldn't all HTTP error code raising function similarly? Shouldn't > I be able to raise a 400 error the same as a 404? Not really. Django has a 404 exception as a quick bail out for when something is missing and it and PermissionD

Strange MySQLdb error

2008-07-05 Thread Aaron
So here's something really strange. I ran Python 2.5.2 (r252:60911, Jun 30 2008, 18:59:56) [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/home/user/run/lib/python2.5/site-packages/setuptools-0.6c8

Re: escaping

2008-07-05 Thread Bobby Roberts
On Jul 5, 4:15 pm, "Horst Gutmann" <[EMAIL PROTECTED]> wrote: > Already tried it without the extra spaces? > > {{ request.session.AccountNum|escape }} > > MfG, Horst man i really thought that had spaces in it in the docs... thanks for the clarification --~--~-~--~~~--

handling currency values

2008-07-05 Thread Bobby Roberts
what is the best way to handle currency values and then display in the correct currency for the current location. In the past, in other programming languages, I usually set the field type to decimal, 4 places and then when I printed the value on the screen, I just used the included formatcurrency

Re: handling currency values

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 21:23 -0700, Bobby Roberts wrote: > what is the best way to handle currency values and then display in the > correct currency for the current location. In the past, in other > programming languages, I usually set the field type to decimal, 4 > places and then when I printed

Re: handling currency values

2008-07-05 Thread Malcolm Tredinnick
On Sun, 2008-07-06 at 14:43 +1000, Malcolm Tredinnick wrote: > > On Sat, 2008-07-05 at 21:23 -0700, Bobby Roberts wrote: > > what is the best way to handle currency values and then display in the > > correct currency for the current location. In the past, in other > > programming languages, I u

Re: Strange MySQLdb error

2008-07-05 Thread Aaron
To answer my own question, turns out it's due to the fact that I have a subdir called "site". I believe this has some conflicts with Python and leads to this strange behavior. After renaming it to something else, the problem goes away. -Aaron On Jul 5, 7:13 pm, Aaron <[EMAIL PROTECTED]> wrote: >

Re: handling currency values

2008-07-05 Thread Eric Abrahamsen
Is this something that might belong in the humanize filters package? Either something like {{ quantity|currency }}, which takes the currency type from locale, if in use, or else explicitly with {{ quantity|currency:"USD" }}? It's not a great savings over just doing it from scratch, but tha

pluggable django ticketing app?

2008-07-05 Thread chefsmart
Does anyone know of a pluggable django ticketing app? Something like the apps used by webhosts for online support? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Re: Do you code django with Komodo?

2008-07-05 Thread joshuajonah
I'm not painfully familiar with the API/whatever to make Komodo extensions, but i know enough python to get there. I can think of a million things that would help me get django apps out there faster. --~--~-~--~~~---~--~~ You received this message because you are su

Re: Non editable fields in admin

2008-07-05 Thread Alex Rades
You mean this? http://code.djangoproject.com/wiki/NewformsHOWTO#Q:HowdoIchangetheattributesforawidgetonasinglefieldinmymodel . It seems there is quite a lot of code involved for each readonly field you want do display... something like readonly_fields would be way better IMHO. On Fri, Jul 4, 200