Re: Dreamhost, Django and MySQL server connection

2006-02-16 Thread Eugene Lazutkin
[EMAIL PROTECTED] wrote: > I have been running this patch for almost 2 days, and I just got my > first "lost connection" So far my "lost connections" could be traced to Dreamhost rebooting servers. I suggest to follow up with them to trace a reason. Thanks, Eugene --~--~-~--~~---

Re: MD5 Password being changed to SHA1 and no longer working

2006-02-16 Thread Matti A
I'm only guessing, since while I've been around django, sha1 has been used as the passwd hash function.. But could you check that if the password actually fits in the space reserved for in the database? my point is (if there is any;)) that md5 creates a 32 digit hash sum and sha1 creates a 40 digi

Re: How to use Decimal() objects

2006-02-16 Thread Brett Hoerner
It just depends if you want to keep Decimal accuracy, floating point numbers lose some accuracy, it's up to you. Technically speaking floats are a little faster. > If the > later is true, where can I find the function that converts to the > Decimal type? It's in the standard library, from deci

Threading Issues running sqlite3 in apache

2006-02-16 Thread Nick Matsakis
System: Mac OS X 10.4.5, Apache 2.2.0, Python 2.4.2, mod_python 3.1.4, py-sqlite 2.0.5, sqlite3 3.2.8. With the exception of the OS and Django, I've installed all the other components through Darwinports. I'm just getting started with Django, and by following the tutorial I was able to set up an

Re: Simple Import Module Question

2006-02-16 Thread Maniac
Siah wrote: >When I try to import utilityfunctions.py from my python console using >the following command, it works just fine: > >from myproject.utility.utilityfunctions import * > >However, once I place this good looking import command inside my >myproject/apps/polls/models/polls.py it gives me

Re: Edit a Foreign Key object from within a view

2006-02-16 Thread Roberto Aguilar
That's strange, it should have simply been a patch generated by "svn diff". I'll paste it into the email in case it's messed up for everyone: Index: media/js/admin/RelatedObjectLookups.js === --- media/js/admin/RelatedObjectLookups.

Re: Edit a Foreign Key object from within a view

2006-02-16 Thread Malcolm Tredinnick
Roberto Aguilar wrote: > Hi everyone, > > I sat down and implemented this functionality. Now when you go to an > admin page that has a pulldown for a Foreign Key object, you'll also > see a change icon that will let you edit the selected object. > > Run this command in django/contrib/admin: > > p

Re: Edit a Foreign Key object from within a view

2006-02-16 Thread Roberto Aguilar
Hi everyone, I sat down and implemented this functionality. Now when you go to an admin page that has a pulldown for a Foreign Key object, you'll also see a change icon that will let you edit the selected object. Run this command in django/contrib/admin: patch -p0 < /path/to/related_object_edit

Simple Import Module Question

2006-02-16 Thread Siah
Probably simple, but this is a problem I cannot figure out. Under my django project directory I have a folder called 'utility': - myproject - urls.py - settings.py - manage.py - __init__.py - apps - - polls - utility __init__.py utilityfunction

Re: Actions on startup?

2006-02-16 Thread Ned Batchelder
Just to close the loop on this, I would like a supported way to execute code once on startup.  In particular, I'll be using it to kick off database upgrade code. --Ned. Adrian Holovaty wrote: On 2/15/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: Actually, I was looking at the mi

ForeignKey dropdown list in custom view

2006-02-16 Thread bsnipes
I am just learning Python and Django and can't seem to be able to figure this out. As a test app I am trying to make a 'foodlog' app to track food eaten, when, and calories. My model file looks like this: --- snip from django.core import meta class Period(meta.Model): name = met

django-admin.py sqlall doesn't include indexes?

2006-02-16 Thread [EMAIL PROTECTED]
Out of curiousity, why doesn't django-admin.py sqlall include the indexes as well as the creates and initial inserts? I'm using Django 0.91 with sqlite3 as the backend - not hard to script it up, but it was sort of surprising that it wasn't there. -joe --~--~-~--~~~

Re: Please help with django tutorial #2

2006-02-16 Thread Jason Davies
Sounds like you haven't done `python manage.py install polls` Regards, Jason --~--~-~--~~~---~--~~ 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

Re: DB.cursor doesn't work properly

2006-02-16 Thread Adrian Holovaty
On 2/16/06, Siah <[EMAIL PROTECTED]> wrote: > Reading up on transaction, I figured I have to commit it, except > cursor.commit() gives me this error: > Error: serialized connection: cannot commit on this cursor > > Any ideas? Hey Sia, Call commit() on the connection object, not the cursor object

How to place a hook after 'load' (ie. get_list, get_object, etc)

2006-02-16 Thread Mike
I am aware that with magic-removal-branch I can override the 'get_list, get_object, etc', but at this stage, how can I call a utility function? Thanks, sia --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: DB.cursor doesn't work properly

2006-02-16 Thread Siah
Reading up on transaction, I figured I have to commit it, except cursor.commit() gives me this error: Error: serialized connection: cannot commit on this cursor Any ideas? Sia --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

DB.cursor doesn't work properly

2006-02-16 Thread Siah
Hi, Some may call this a feature, I call it a bug: If I do: cursor = db.cursor() cursor.execute("insert into tablename values(5,'somename')") It will work without giving me an error. Even if I run a select statement within the same session, it would confirm that that record was entered. But, my

Re: mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-16 Thread Paul Smith
On Feb 16, 2006, at 11:03 AM, Adrian Holovaty wrote: > > On 2/16/06, paolo <[EMAIL PROTECTED]> wrote: >> Hi, I had problems running Django with mod_python, so I had the >> possibility to investigate and obtain some detailed info, which I'd >> like to share here. > > Thanks very much for this fin

Re: Dreamhost, Django and MySQL server connection

2006-02-16 Thread [EMAIL PROTECTED]
I have been running this patch for almost 2 days, and I just got my first "lost connection" Traceback (most recent call last): File "/home/skabber/python/django/core/handlers/base.py", line 74, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/skab

Please help with django tutorial #2

2006-02-16 Thread ak
Hello guys I have a problem with walking through the second official django tutorial (http://www.djangoproject.com/documentation/tutorial2/). The problem is as follows. I have sucessfully logged in to the admin area, then clicked to the Polls and see my polls list. But if I click to edit a poll o

Re: using django models with twisted?

2006-02-16 Thread Michael Twomey
On 15/02/06, Steven Armstrong <[EMAIL PROTECTED]> wrote: > > Is anybody using django models in twisted (or other async) apps? > Any ideas on how to make the two play together nicely? > I'd say they should work reasonably well, you would need to punt the calls to threads using twisted.internet.thre

Re: Can't Get mod_python script running

2006-02-16 Thread Eric Walstad
Hi treelife, On Thursday 16 February 2006 06:27, treelife wrote: > I need to run Django, but can't get past mod_python.  I'm getting and > internal server error when | run the following mod_python script. > Script: > > from mod_python import apache > > def handler(req): >     req.content_type = '

Re: Request for ideas

2006-02-16 Thread Tapiwa
Great idea. Look at what the people at Symfony (PHP5 Rails like framework) did in December with Askeet. http://www.symfony-project.com/askeet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-16 Thread Adrian Holovaty
On 2/16/06, paolo <[EMAIL PROTECTED]> wrote: > Hi, I had problems running Django with mod_python, so I had the > possibility to investigate and obtain some detailed info, which I'd > like to share here. Thanks very much for this fine collection of information and links. I've updated the documenta

How to use Decimal() objects

2006-02-16 Thread [EMAIL PROTECTED]
Hello, I noticed that when a FloatField gets pulled back out of the database (mysql in my case) it has an object type of "Decimal". If I try to add such an object to a float, python complains that it can't combine these two types. What is the convention for handling this situation? Should I conv

Can't Get mod_python script running

2006-02-16 Thread treelife
I need to run Django, but can't get past mod_python. I'm getting and internal server error when | run the following mod_python script. Script: from mod_python import apache def handler(req): req.content_type = 'text/plain' req.write("Under Construction") return apache.OK Here is so

Re: Version 1.0 Features

2006-02-16 Thread ChaosKCW
Thanks, I may look at accessing the cursor directory for TP stuff. S --~--~-~--~~~---~--~~ 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 uns

populating many to many relationship data in a changemanipulator and filtering m2m data out

2006-02-16 Thread Jeremy Jones
Do ChangeManipulators not automatically populate many-to-many relationship data? Both the AddManipulator and the ChangeManipulator put in a select list of the possible related data, but the ChangeManipulator doesn't select which ones are actually related. The admin interface shows related data a

Re: mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-16 Thread Graham King
Graham King wrote: > > > paolo wrote: > >>Hi, I had problems running Django with mod_python, so I had the >>possibility to investigate and obtain some detailed info, which I'd >>like to share here. >> >>I'd like to suggest "Expat Causing Apache Crash", which explains >>problems caused due to

Re: How to pass a variable as parameter to a tag

2006-02-16 Thread limodou
On 2/16/06, Leeuw van der, Tim <[EMAIL PROTECTED]> wrote: > > But isn't the idea that you can use the parameter passed as name of key > to lookup in context? Then you can pass parameter to tag. > This way can only deal with the viariable which exists in context. But how about: {% mytag {{object.

Re: recommended javascript books/tutorials/howtos?

2006-02-16 Thread Graham King
Luke Plant wrote: > On Tuesday 14 February 2006 10:07, Gábor Farkas wrote: > > >>i'd like to increase/enhance my javascript knowledge, which right now >>is rather limited (zero?) :) >> >>so, are there are books/websites you can recommend? >> >>i'm primarily interested in the application of java

Re: recursive template calls

2006-02-16 Thread [EMAIL PROTECTED]
Shannon -jj Behrens wrote: > I think it's unfortunately that template writers have to resort to > Python just to package up a bit of HTML into a function, but that's > just my opinion. In the normal case, you can just use the {% include %} tag, so you don't have to resort to Python. It is the r

Re: mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-16 Thread Graham King
paolo wrote: > Hi, I had problems running Django with mod_python, so I had the > possibility to investigate and obtain some detailed info, which I'd > like to share here. > > I'd like to suggest "Expat Causing Apache Crash", which explains > problems caused due to mismatches in the version of t

RE: How to pass a variable as parameter to a tag

2006-02-16 Thread Leeuw van der, Tim
But isn't the idea that you can use the parameter passed as name of key to lookup in context? Then you can pass parameter to tag. --Tim -Original Message- From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of limodou Sent: woensdag 15 februari 2006 8:52 To: django-us

Re: mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-16 Thread Graham King
Yes, that is the case. Jacob Kaplan-Moss wrote: > On Feb 15, 2006, at 4:19 PM, Graham King wrote: > >> I have been getting a segmentation fault when using >>django.utils.feedgenerator to generate an RSS feed of my site. This >>works fine with 'django-admin runserver', but when run under >>m

Re: mod_python Segmentation fault importing django.utils.feedgenerator.py - with fix

2006-02-16 Thread paolo
Hi, I had problems running Django with mod_python, so I had the possibility to investigate and obtain some detailed info, which I'd like to share here. I'd like to suggest "Expat Causing Apache Crash", which explains problems caused due to mismatches in the version of the "expat" library embedded