Re: ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1 But I HAVE 1.2.2!

2009-03-15 Thread Malcolm Tredinnick
On Sun, 2009-03-15 at 21:08 -0700, Theme Park Photo, LLC wrote: > I'm getting this message when trying to start Django (from mod_python) > > > (From my apache log) > > [Sun Mar 15 22:07:28 2009] [error] [client 67.188.95.50] PythonHandler > django.core.handlers.modpython: ImproperlyConfigured:

ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1 But I HAVE 1.2.2!

2009-03-15 Thread Theme Park Photo, LLC
I'm getting this message when trying to start Django (from mod_python) (From my apache log) [Sun Mar 15 22:07:28 2009] [error] [client 67.188.95.50] PythonHandler django.core.handlers.modpython: ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1 BUT! I have 1.2.2 insta

Re: Complex Form Issue with saving only 1 of 4 form items

2009-03-15 Thread Malcolm Tredinnick
On Sun, 2009-03-15 at 18:54 -0700, steven.head...@gmail.com wrote: > Hello, > I am trying to create a complex form similar to the poll example. [...] > This method displays my form correctly, but when I try to save filling > out only 1 of the 4 Choices, I get a required validation error. Is >

Re: FormSet max_num and extra

2009-03-15 Thread Kegan Gan
Ah, got it! Many thanks Malcolm. On Mar 16, 5:58 am, Malcolm Tredinnick wrote: > On Sun, 2009-03-15 at 04:25 -0700, Kegan wrote: > > I am dealing with formset, and finding the lack of documentation in > > understanding it. Hope anyone experienced with formset could help. > > At some point just

Complex Form Issue with saving only 1 of 4 form items

2009-03-15 Thread steven.head...@gmail.com
Hello, I am trying to create a complex form similar to the poll example. My create method is very similar to the following: def create(request): if request.method == 'GET': pollform = bforms.PollForm() choiceforms = [] for i in range(4): choiceforms.app

Re: Memcache unstable under consistent heavy load

2009-03-15 Thread Jacob Kaplan-Moss
On Sun, Mar 15, 2009 at 8:43 PM, meppum wrote: > Did you run the script on the same machine as the memcached > installation or did you do it across the wire? Both; I can't seem to find any problems. Again, what's the error you're getting? Jacob --~--~-~--~~~---~--~

Re: ImportError: Could not import settings, but with an EACCES puzzle

2009-03-15 Thread Jim Hickstein
It was SELinux, enabled by default on CentOS 5.2 (apparently). The man page for stat(2) didn't mention SELinux, but some web page I stumbled on did. I started to dig into chcon(1) and all that -- geez, it must be a new century -- got it to find my application, then django itself, then anothe

Re: Memcache unstable under consistent heavy load

2009-03-15 Thread Jacob Kaplan-Moss
On Sun, Mar 15, 2009 at 7:42 PM, meppum wrote: > I've created a small script that *should* cause this error on any > machine running memcached. Any thoughts would be appreciated. Not for me -- the given script completes (quickly) without error on every memcached installation I've got access to.

Re: Where do we put our templates?

2009-03-15 Thread Dougal Matthews
Correct, basically as long as Python can access it your all good. Just put it somewhere that makes sense. Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/15 Joshua Partogi > > Thanks Doug. > > I kinda get the gist now. It seems that template is parsed internally >

Re: Creating KML files for use in Google Maps

2009-03-15 Thread Ariel Mauricio Nunez Gomez
> > > view > > > > def generateKml(request): > > > > locations = Location.objects.all().values('name','lat','longt') > > > > result= render_to_response('locations.kml',{ > > 'locations': locations > > }) > > > > return HttpResponse(result,mimetype='Content-Type:appl

Re: Overriding django admin functionality

2009-03-15 Thread Malcolm Tredinnick
On Sun, 2009-03-15 at 16:06 -0700, Joshua Partogi wrote: > Thanks Malcolm, > > I'm going to read through the source code and see how I can create a > new template with my custom authorization. So do you reckon that > django admin system is already sufficient not to be overridden? It depends very

Re: Overriding django admin functionality

2009-03-15 Thread Joshua Partogi
Thanks Malcolm, I'm going to read through the source code and see how I can create a new template with my custom authorization. So do you reckon that django admin system is already sufficient not to be overridden? Best regards, On Mar 16, 9:58 am, Malcolm Tredinnick wrote: > On Mon, 2009-03-16

Re: Where do we put our templates?

2009-03-15 Thread Joshua Partogi
Thanks Doug. I kinda get the gist now. It seems that template is parsed internally by django so it doesn't matter where I put it, which is quite contrary to static files like js/css/images. Kind regards, On Mar 15, 12:25 am, Dougal Matthews wrote: > You can put them where you want but generall

Re: Overriding django admin functionality

2009-03-15 Thread Malcolm Tredinnick
On Mon, 2009-03-16 at 09:40 +1100, Joshua Partogi wrote: > Dear all, > > I need a custom authorization needs for the admin system. I need to > define certain users that is allowed to access certain admin > functionality. I also need to check whether use has logged in or not. > In the end I might

Re: Snap and SCT - any reviews?

2009-03-15 Thread Jacob Kaplan-Moss
On Sun, Mar 15, 2009 at 5:40 PM, John Crawford wrote: > Anyone? Anyone? Bueller? That's rude. Please don't take the amazing work of the volunteers on this board for granted. Nobody here is required to update your question, and if you don't get an answer that's just the way it goes. Further, you

Re: Creating KML files for use in Google Maps

2009-03-15 Thread Malcolm Tredinnick
On Fri, 2009-02-27 at 05:06 -0800, phoebebright wrote: > Took me a long long time to work out why the .kml file I created in > django would parse as valid in Feedburner but googlemaps said it was > an invalid kml file. Need to be sending as correct content-type of > course. [...] > view > >

Re: JSON Model Serialization

2009-03-15 Thread Mateusz Wawrzyniak
On Mar 14, 10:14 pm, MartinBorthiry wrote: > Hello: > >  I'm Trying to serialize a dict which have a list of Model's instance. > The format that i need is json. Something  like that: > >     people = Person.objects.all() Why don't you use Person.objects.values()? You will get a list of dicts s

Re: Snap and SCT - any reviews?

2009-03-15 Thread John Crawford
Anyone? Anyone? Bueller? John Crawford wrote: > Hello, I have been looking for Django-based forum-building software, > and so far, the two best candidates are Snap and SCT. Does anyone have > any experience with either, and willing to comment on them? Or are > there other apps that might be bette

Overriding django admin functionality

2009-03-15 Thread Joshua Partogi
Dear all, I need a custom authorization needs for the admin system. I need to define certain users that is allowed to access certain admin functionality. I also need to check whether use has logged in or not. In the end I might be creating the admin from scratch. Is there any documentation I can

latitude/longitude field type

2009-03-15 Thread Sergio
Hello, I'm working on field validation for latitude and longitude. I need to validate them according to the DMS (degree, minutes, seconds) format. I was wondering if there is already a django field model extension for this. I know about geodjango, but that is too much for my needs. Cheers, Sergi

Re: Admin filtering on a foreign key is "an unsorted mess" (not my words)

2009-03-15 Thread Eric
Thanks a lot, Daniel! That did the trick. On Feb 20, 4:55 am, Daniel Roseman wrote: > On Feb 20, 4:32 am, Eric wrote: > > > > > Hi, I have an admin filter that filters all entries that have a > > particular foreign key. Specifically, this foreign key is a "Code" > > object that contains a "Co

Re: FormSet max_num and extra

2009-03-15 Thread Malcolm Tredinnick
On Sun, 2009-03-15 at 04:25 -0700, Kegan wrote: > I am dealing with formset, and finding the lack of documentation in > understanding it. Hope anyone experienced with formset could help. At some point just opening up the relevant source file is always a good solution. It's only Python code and no

Re: ANN: jaqndjan v0.0.1 A 'Template authoring framework' that integrates django templates with jQuery

2009-03-15 Thread molicule
Correcting a Typo: please note the project name on github is jaqndjan On Mar 15, 1:33 pm, molicule wrote: > Hi, > > jaqndjan is A 'Template authoring framework' that integrates django > templates with jQuery > available at:  http://github.com/molicule/jaqndjan/tree/master > > For now you can use

ANN: djaqndjan v0.0.1 A 'Template authoring framework' that integrates django templates with jQuery

2009-03-15 Thread molicule
Hi, djaqndjan is A 'Template authoring framework' that integrates django templates with jQuery available at: http://github.com/molicule/jaqndjan/tree/master For now you can use djaqndjan to create drop-in django-Form templates that have sophisticated client-side validation. (it integrates the j

FIXED: Can't run django on Apache

2009-03-15 Thread Rex
On Mar 14, 7:52 pm, Rex wrote: > On Mar 4, 12:47 pm, John Maines wrote: > > > > > Hello: > > > I've installed Django 1.0 on Ubuntu and am trying to get it to run on > >Apache.Apacheis installed, working fine, with mod-python also in > > place. I'm new at everything Linux. > > > But when I try

Re: JSON Model Serialization

2009-03-15 Thread bruno desthuilliers
On 15 mar, 18:39, MartinBorthiry wrote: (snip) > Bruno, Thank you for your reply. > I tried your snipper, but I had the same error. Uh ? How did you try it (please provide relevant code) ? This code is used in production and AFAICT, it JustWork(tm), so if you happened to find a bug, I'd rea

Re: Strip empty lines in rendered templates?

2009-03-15 Thread Tim Chase
> This template code: > > > {% for entry in entries %} > {{ entry.title }} > {% endfor %} > > > looks like this when rendered: > > > > Title 1 > > Title 1 > > Title 1 > > While it goes against my aesthetic tastes for making easy-to-read templates (I much prefer my templates look like

Re: Vanity urls: Eg mysite.com//....

2009-03-15 Thread Alex Gaynor
On Sun, Mar 15, 2009 at 2:31 PM, Dougal Matthews wrote: > Hi, > I've used a similar approach once - works fine. Although, you might want to > sacrifice such a short url for something that is easier to read/understand > that 'u' and 'g'. > > Cheers, > Dougal > > --- > Dougal Matthews - @d0ugal > h

Re: Vanity urls: Eg mysite.com//....

2009-03-15 Thread Dougal Matthews
Hi, I've used a similar approach once - works fine. Although, you might want to sacrifice such a short url for something that is easier to read/understand that 'u' and 'g'. Cheers, Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/15 ldm999 > > I'm using Django Auth

Re: Strip empty lines in rendered templates?

2009-03-15 Thread Dougal Matthews
Something like this might be able to help you? http://www.davidcramer.net/code/369/spaceless-html-in-django.html Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/15 Benjamin Buch > > Hi, > > is there a way to tighten up the output that Django renders? > Especially,

Strip empty lines in rendered templates?

2009-03-15 Thread Benjamin Buch
Hi, is there a way to tighten up the output that Django renders? Especially, remove the empty lines? This template code: {% for entry in entries %} {{ entry.title }} {% endfor %} looks like this when rendered: Title 1 Title 1 Title 1 I stumbled upon this middleware, http://code.djang

Re: JSON Model Serialization

2009-03-15 Thread MartinBorthiry
> > I'm Trying to serialize a dict which have a list of Model's instance. > > The format that i need is json. Something like that: > > > people = Person.objects.all() > > res = {'res':0, 'msg':'Ok','data': people} > > > but, i need that result: > > {'res':0, 'msg':'

Re: File handling when not using POST form but service call (base64)

2009-03-15 Thread coulix
Solved using from djang.core.files.base import ContentFile Thanks to Guðmundur H On Mar 15, 3:21 pm, coulix wrote: > Hi all, > > I am using Pyamf to transfer a dynamically generated large image from > Flex to Django. > On the Django side i receive the encodedb64 data as a parameter: > > My Item

Vanity urls: Eg mysite.com//....

2009-03-15 Thread ldm999
I'm using Django Auth and would like to include username in my urls. So, eg, I might have urls like the following: - mysite.com/tom/books/moby-dick - mysite.com/dick/books/moby-dick - mysite.com/harry/books/catch-22 To further complicate things, I'd like to support groups too. So that first url

Re: Best way to trap IntegrityError in Django form?

2009-03-15 Thread ldm616
In the end I just did it in the view. Checked for the duplicate before saving, and sent an error message back to the form if the dupe test fails. Looks like this. And downside to this approach? def add_fablist(request): # ---

Re: Django critter helps us code at the speed of light.

2009-03-15 Thread mrts
On Mar 12, 1:24 pm, Nick wrote: > On Mar 11, 6:10 pm, Eric Walstad wrote: > > Now you can have your pony AND a Django > > Critter:http://starship.python.net/~ewalstad/django_critter.html > > Excellent!  I think I prefer the Critter to the Pony... I takes a brave man to identify himself with

Re: Beginner

2009-03-15 Thread TP
I now get this: ln: creating symbolic link `python/lib/python2.5/site-packages/django/ bin/django-admin.py': File exists Has that worked? On Mar 15, 2:59 pm, Alex Gaynor wrote: > On Sun, Mar 15, 2009 at 9:57 AM, TP wrote: > > > Thanks for you help. > > > I have tried this but im not sure I a

Re: Beginner

2009-03-15 Thread TP
I get the same problem that I got when I tried to do it. ln: creating symbolic link `scs5tdp/lib/python2.5/site-packages/django/ bin/django-admin.py': No such file or directory On Mar 15, 2:59 pm, Alex Gaynor wrote: > On Sun, Mar 15, 2009 at 9:57 AM, TP wrote: > > > Thanks for you help. > > >

Re: Beginner

2009-03-15 Thread Alex Gaynor
On Sun, Mar 15, 2009 at 9:57 AM, TP wrote: > > Thanks for you help. > > I have tried this but im not sure I am doing it correctly... > > What is the command to symlink the files? > > On Mar 15, 2:53 pm, coulix wrote: > > You have to create a link "ln -s" for /usr/bin/django-admin.py > > pointing

Re: Beginner

2009-03-15 Thread TP
Thanks for you help. I have tried this but im not sure I am doing it correctly... What is the command to symlink the files? On Mar 15, 2:53 pm, coulix wrote: > You have to create a link "ln -s" for /usr/bin/django-admin.py > pointing to /usr/lib/python2.5/site-packages/django/bin/django- > adm

Re: Beginner

2009-03-15 Thread coulix
You have to create a link "ln -s" for /usr/bin/django-admin.py pointing to /usr/lib/python2.5/site-packages/django/bin/django- admin.py Or you can do it the long way "python /usr/lib/python2.5/site-packages/ django/bin/django-admin.py startproject foo" On Mar 15, 3:26 pm, TP wrote: > I have jus

Re: fastcgi can not send url to my backend server

2009-03-15 Thread Robert Chen
Yes, that's the reason, thanks very much. I commented out "check-local" because I thought it came with "socket" configuration. That's the mistake. Now it woks. Thanks. Robert. On Sun, Mar 15, 2009 at 7:45 PM, Ramiro Morales wrote: > > On Sun, Mar 15, 2009 at 8:50 AM, Robert Chen > wrote: > >

Re: Model problem, default not propagating to SQL

2009-03-15 Thread Jacob Kaplan-Moss
On Sat, Mar 14, 2009 at 11:56 PM, kpeters wrote: > default (active field) does not seem to propagate - see below > (Postgres 8.3.6 - current Django as of yesterday) > > Any ideas? This is expected behavior: the `default` argument can be things that can't properly be represented in a database. Co

Beginner

2009-03-15 Thread TP
I have just started to use Django on a Linux machine and when trying to create a new problem I get the following error: django-admin.py: command not found Any suggestions ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

File handling when not using POST form but service call (base64)

2009-03-15 Thread coulix
Hi all, I am using Pyamf to transfer a dynamically generated large image from Flex to Django. On the Django side i receive the encodedb64 data as a parameter: My Item model as an imagefield. What i have trouble to do is saving the data as the File Django Field. def save_item(request, uname, dat

Re: Lookup across relations

2009-03-15 Thread 3xM
Gees... It messed with my link. I'll try again: http://blackfin.cannedtuna.org/django-testcase.tar.gz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-u

Re: Lookup across relations

2009-03-15 Thread 3xM
So, now I had the time to create at clean test case. it can be downloaded here: It contains a few views etc. to show the data in the database (in sqlite3 format, also included in the .tar.gz). Now, if I go into django's interactive shell (

Re: fastcgi can not send url to my backend server

2009-03-15 Thread Ramiro Morales
On Sun, Mar 15, 2009 at 8:50 AM, Robert Chen wrote: > Hi, all: > I used Lighttpd + fastcgi to deploy my Django project. My lighttpd > configuration is as following: > > > fastcgi.server = ( > "/ziyoudu.fcgi" => ( > > "main" => ( >

FormSet max_num and extra

2009-03-15 Thread Kegan
I am dealing with formset, and finding the lack of documentation in understanding it. Hope anyone experienced with formset could help. What is the reason to have a "max_num" and "extra" argument when instantiating a form set (using formset_factory)? Can't you just use "max_num" to determine the n

fastcgi can not send url to my backend server

2009-03-15 Thread Robert Chen
Hi, all: I used Lighttpd + fastcgi to deploy my Django project. My lighttpd configuration is as following: server.modules = ( "mod_rewrite", "mod_redirect", "mod_alias",