Re: Django with an empty response after database access - Apache2/mod_python and MySQL on Debian Sarge

2006-09-19 Thread phxx
Ok, I think I've solved the problem on my own. Yesterday I coincidentally found this mod_python FAQ Entry: http://www.modpython.org/FAQ/faqw.py?req=show=faq02.013.htp Though I changed my configs to run Django with Fast-CGI and it works :-) Yeah, FCGI rocks! Bye, Gregor Müllegger

Re: admin complains when adding a new User

2006-09-19 Thread Nara Narasimhan
OK, It is because I had a non-empty string in settings.py forTEMPLATE_STRING_IF_INVALID,namely, TEMPLATE_STRING_IF_INVALID='-TEMPLATE -VARIABLE-IS-MISSING-'Setting to "" # empty string worked around the problem.I see now that there is already a ticket for this:

Re: admin complains when adding a new User

2006-09-19 Thread nara
If I set APPEND_SLASH=False in my settings.py, then I see this POST at the end of my log: [20/Sep/2006 03:28:15] "POST /admin/auth/user/add/-TEMPLATE-VARIABLE-IS-MISSING- HTTP/1.1" 404 4838 Not sure if this gives any further clues. BTW, I svn update everyday, and try things on either the main

Re: Charfield maxlength (bug?)

2006-09-19 Thread Enrico
Yes, maybe this will be solved when Django becomes fully "unicoded". Also, it's not a big issue, I can live with that for a while. Maybe I can fix the data myself before saving the model. Thanks for the help Ivan. Best regards. Enrico --~--~-~--~~~---~--~~

Re: ManytoMany filtering

2006-09-19 Thread Gabriel Puliatti
On Wed, 2006-09-20 at 10:40 +1000, Malcolm Tredinnick wrote: > > Homework.objects.filter(course__in = > list(classesjoined.all())) > > The list() call may be superfluous there, but I have a recollection > that > we don't handle iterators smoothly in filter() calls. I may be >

Re: Python 2.5 anyone

2006-09-19 Thread Matthew Flanagan
On 20/09/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 9/19/06, Ramdas S <[EMAIL PROTECTED]> wrote: > > Is anyone running Django dev version on Python 2.5? Will it work or are > > there any issues? > > Python 2.5 doesn't break or remove anything, it just adds some new > features. So it

Re: ManytoMany filtering

2006-09-19 Thread Malcolm Tredinnick
On Tue, 2006-09-19 at 18:59 -0500, Gabriel Puliatti wrote: > On Wed, 2006-09-20 at 09:35 +1000, Malcolm Tredinnick wrote: > > It's possible that I've guessed at the missing details incorrectly. In > > that case, could you give us an example of what "classesjoined" contains > > (print it out;

Re: ManytoMany filtering

2006-09-19 Thread Gabriel Puliatti
On Wed, 2006-09-20 at 09:35 +1000, Malcolm Tredinnick wrote: > It's possible that I've guessed at the missing details incorrectly. In > that case, could you give us an example of what "classesjoined" contains > (print it out; don't guess at what you think it should it be) and maybe > show the

Re: Problem accessing users and groups in Admin

2006-09-19 Thread Malcolm Tredinnick
On Tue, 2006-09-19 at 15:22 -0700, Jaanus wrote: > I'm getting exactly the same problem. Upgraded from 0.91 to 0.95, > carefully followed the RemovingTheMagic instructions from wiki, changed > code, schema and data as instructed, tested everything. All works fine > EXCEPT changing and adding

Re: ManytoMany filtering

2006-09-19 Thread Malcolm Tredinnick
On Tue, 2006-09-19 at 17:41 -0500, Gabriel Puliatti wrote: > Hello. I'm trying to get some database objects using objects.get. > However, I only want to get those objects which match a certain > manytomany. Is there a way to do this? > > For example, each student has multiple subjects and each

Re: Non-unicode strings.

2006-09-19 Thread Malcolm Tredinnick
On Tue, 2006-09-19 at 18:33 +, Pupeno wrote: > On Tuesday 19 September 2006 02:58, Malcolm Tredinnick wrote: > > That's true. We aren't using unicode universally at the moment. There is > > work in progress to fix this, but it has no completion date at the > > moment. > > So, I can't store

Phoenix Users

2006-09-19 Thread Bryan
If you live in the Phoenix area and would be interested in attending a django users group, please respond to this thread: http://groups.google.com/group/refreshphoenix/browse_frm/thread/c04332f78a68ecef?hl=en Thanks, Bryan --~--~-~--~~~---~--~~ You received

ManytoMany filtering

2006-09-19 Thread Gabriel Puliatti
Hello. I'm trying to get some database objects using objects.get. However, I only want to get those objects which match a certain manytomany. Is there a way to do this? For example, each student has multiple subjects and each homework has one subject assigned to it. Then, there is a Subject

Re: Problem accessing users and groups in Admin

2006-09-19 Thread Jaanus
I'm getting exactly the same problem. Upgraded from 0.91 to 0.95, carefully followed the RemovingTheMagic instructions from wiki, changed code, schema and data as instructed, tested everything. All works fine EXCEPT changing and adding users in the admin, which gives a 404. Any ideas would be

Re: Portlet like features

2006-09-19 Thread Frankie Robertson
On 19/09/06, Waylan Limberg <[EMAIL PROTECTED]> wrote: > > On 9/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Well - yes but most MVC type applications have a dispatcher like > > architecture where the request is caught by a single resource which > > then locates the controller to

Re: Python 2.5 anyone

2006-09-19 Thread James Bennett
On 9/19/06, Ramdas S <[EMAIL PROTECTED]> wrote: > Is anyone running Django dev version on Python 2.5? Will it work or are > there any issues? Python 2.5 doesn't break or remove anything, it just adds some new features. So it should work just fine. Backwards compatibility of Python releases

Re: multiple database, messy solution?

2006-09-19 Thread rp
Hi Gregor, Thanks for the note. I'm quite excited about trying it this out. I'll post the results (I'm still a meeting away from finalizing the server changes) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: How to make django use psycopg2 as the default engine?

2006-09-19 Thread Waylan Limberg
On 9/19/06, 叮叮当当 <[EMAIL PROTECTED]> wrote: > > i got it. > > DATABASE_ENGINE = 'postgresql_psycopg2' > > but the setting.py's comment don't mention this, 郁闷ing > If I recall correctly, that is because it's not officially supported as there are some compatibility issues in various cases. You may

Re: Portlet like features

2006-09-19 Thread Waylan Limberg
On 9/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Well - yes but most MVC type applications have a dispatcher like > architecture where the request is caught by a single resource which > then locates the controller to handle the request. > Anyways, I think I got most of it to work

Re: Non-unicode strings.

2006-09-19 Thread Pupeno
On Tuesday 19 September 2006 02:58, Malcolm Tredinnick wrote: > That's true. We aren't using unicode universally at the moment. There is > work in progress to fix this, but it has no completion date at the > moment. So, I can't store Unicode strings on PostgreSQL and expect it to work under any

Re: Python 2.5 anyone

2006-09-19 Thread Oliver Andrich
Hi, I am running Django 0.95 . And so far I can't see any problems. Best regards, Oliver -- Oliver Andrich <[EMAIL PROTECTED]> --- http://roughbook.de/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Generalized questions as forms and user response handling?

2006-09-19 Thread Rob Hudson
I see 2 solutions: 1) A manipulator and view function for each form. A URL mapping to the view function. Advantage: Some work done for me. Unresolved: - The form response handling will be duplicated across each manipulator. - Not sure how to pull user response data back into the form if they

Python 2.5 anyone

2006-09-19 Thread Ramdas S
Hi,Is anyone running Django dev version on Python 2.5? Will it work or are there any issues?RS --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Download counter?

2006-09-19 Thread frank
Thanks, Barry and Malcolm! I'll have to explore a bit more to see if the Redirect class will work for me. And no, the grep approach (while conceptually simple) would be messy. -f --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Strange problems with django (python related?)

2006-09-19 Thread Andrew Degtiariov
Hello folks! I have see very strange problem in both 0.91 and 0.95 django both with mod_python and django-admin.py. Manipulator's class EditZone build form and handle Zone object. Form has "instances" field (SelectField type) which have build from Zone.instance.clients.instance_set.all(). Also

Re: Problem with patch 2070

2006-09-19 Thread jacobm
I just checked out at 3581, applied 3581-streaming_uploads_and_uploadprogress_middleware_x_progress_id.diff and am still getting the same behaviour. Thanks, Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: multiple database, messy solution?

2006-09-19 Thread phxx
I guess you query one database through django.db.connection.cursor() method. Though you could query the athor one by using the MySQLdb Module ( http://sourceforge.net/projects/mysql-python ). It would be something like that: >>> import MySQLdb as db >>> c = db.connection(host='hostaddress',

Re: Unable to login to admin interface

2006-09-19 Thread mauiblu
OK..works fine with Zonealarm off. Does anyone have any insight into the right Zonealarm settings? I tried adding the localhost under Privacy settings but Zonealarm says it can't find it. The pythoin server is running...which I guess is obvious since I'm getting the admin login page. Thanks for

Re: Unable to login to admin interface

2006-09-19 Thread mauiblu
it's a firewall issue...sorting it out now --~--~-~--~~~---~--~~ 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,

Problem with patch 2070

2006-09-19 Thread jacobm
Hi, I'm using patch 2070 for large streaming uploads in a relatively simple webapp, but I am getting reproducable exceptions whenever I upload m3u text files (doesn't seem to happen with any other kinds of files). I am running django at rev 3769 plus the 2070 patch from a file named:

Re: Unable to login to admin interface

2006-09-19 Thread mauiblu
mauiblu wrote: > I get a message saying my browser isn't configured to accept > cookies..but it is. Any further info? I'm stuck in this step. Browswer IS set to accept cookies, which is the error message I get after entering correct superuserid and password... Thanks, Jim

multiple database, messy solution?

2006-09-19 Thread rp
Hi, I work for a company that has a retail website with separate (1) staging and (2) live versions--separate mysql databases and web apps. We make changes on staging, Q/A them, and move them live. Changes are mostly mysql data changes. We're going to start using django for mysql changes to

Re: Multiple Components on One Page

2006-09-19 Thread Laundro
I have re-read the template documentation with Malcolm's answer in mind, and it all makes a lot more sense now. Im 'ooh-aah'-ing at Django more and more each day. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Download counter?

2006-09-19 Thread spacedman
Malcolm Tredinnick wrote: > The minor problem with that approach is that it means people can avoid > the Django counter and directly fetch the URL. So if counting is a > requirement, that solution needs an extra tweak to ensure that you have > first visited the counter page. This can be done

Django with an empty response after database access - Apache2/mod_python and MySQL on Debian Sarge

2006-09-19 Thread phxx
Hi all together. Since a few weeks i have a problem with database access in my django installation. On views, which use some Database related actions (mysql as backend) i get a "Zero Sized Reply" Message from my local proxy. That means that there it is simply an empty Response. The confusing

Re: Charfield maxlength (bug?)

2006-09-19 Thread Ivan Sagalaev
Enrico wrote: > Hi, > > It raises a "programming error": > > (1064, "You have an error in your SQL syntax. Check the manual that > corresponds to your MySQL server version for the right syntax to use > near 'WARNINGS' at line 1") Oh... Then I'm out, don't know much about MySQL in this regard.

Re: Multiple Components on One Page

2006-09-19 Thread Holger Schurig
> I am a recovering .NET addict and still very new to Python, so > just talk some heavy python right now and you can probably > make my head explode :-). http://www.diveintopython.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Charfield maxlength (bug?)

2006-09-19 Thread Enrico
Hi, It raises a "programming error": (1064, "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WARNINGS' at line 1") Location "MySQLdb\connections.py" in defaulterrorhandler, line 33. The backend tries to

Re: Multiple Components on One Page

2006-09-19 Thread [EMAIL PROTECTED]
Hi Malcom, That actually answers it perfectly. I had found bits and pieces of what you said, but you wrapped it up quite well. It makes complete sense that you really wouldn't want to be calling multiple views at one time, because something has to be the "controlller". With the template tags

Re: base template and URLs in it

2006-09-19 Thread Filipe
I think this thread may point you in the right direction: http://groups.google.com/group/django-users/browse_frm/thread/a950925c3ce6d7d2/fabe999ea8180b21 Cheers, filipe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Template traumas... (Crashes server... ignore this)

2006-09-19 Thread Malcolm Tredinnick
Hi Tom, On Tue, 2006-09-19 at 11:25 +0100, Tom Smith wrote: > > Whilst writing what is below I realized that if a template extends > itself (accident...oops!) it completely crashes the server... maybe > this could be trapped somehow... My first reaction was "woah, cool! :-)", but that's

Template traumas... (Crashes server... ignore this)

2006-09-19 Thread Tom Smith
Whilst writing what is below I realized that if a template extends itself (accident...oops!) it completely crashes the server... maybe this could be trapped somehow... > I have a base.html template which has HTML and defines a block > "content", like this... > > Hello > {% block

Re: how to make the admin search form matching results by 'exact' but not 'icontains'

2006-09-19 Thread Pedro Lima
Did you check this part of the documentation? http://www.djangoproject.com/documentation/model_api/#search-fields regards, pvl --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

how to make the admin search form matching results by 'exact' but not 'icontains'

2006-09-19 Thread [EMAIL PROTECTED]
i have a huge mysql database table, around 500million rows. whenever i use the admin search form,it use icontains to match the results. but that is so so so slow! i wanna to know if i can change the admin search to 'exact' or 'full-text search'?

Re: template and special character problem

2006-09-19 Thread Phil
I finally nailed it ! For some strange reason my editor did not save the index.html template in utf8. I've reloaded both template in another editor, force to save in utf-8 and all went well. Thanks to all for the support. Jorge Gajon wrote: > On 9/18/06, Phil <[EMAIL PROTECTED]> wrote: > > I

Re: Problem with INSTALLED_APPS setting

2006-09-19 Thread [EMAIL PROTECTED]
Waylan Limberg wrote: > Go reread your first post (I did a few times). You said 'liger' was an > app not a project. Which is it? If it is an app but not within a > project, that could be your problem. Hey Waylan, tnx for taking the time to follow up on this and sorry for mis-leading you in the

Re: Multiple Components on One Page

2006-09-19 Thread Malcolm Tredinnick
On Mon, 2006-09-18 at 18:38 +, [EMAIL PROTECTED] wrote: > I am new to Django, and forgive me if this is a question that has > already been answered, but I can not seem to find the "official" > answer. I will explain what I am trying to figure out with an example. > > I am building a wiki, I

Re: Multiple Components on One Page

2006-09-19 Thread Laundro
Well worded. I've been wanting to solve exactly this kind of problem as well. I feel like there's something we're not "getting". A simple example in my case is a login form and a search form. Both come from different views, but up till now I haven't found a way of integrating them both in one

Re: How to make django use psycopg2 as the default engine?

2006-09-19 Thread 叮叮当当
i got it. DATABASE_ENGINE = 'postgresql_psycopg2' but the setting.py's comment don't mention this, 郁闷ing --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How to make django use psycopg2 as the default engine?

2006-09-19 Thread 叮叮当当
i use postgres database and i installed psycopg2 engine, but it seems the django use psycopg as the default engine , how to change psycopg2 as the engine? thx. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: static content -- authentication?

2006-09-19 Thread shaunc
Wonderful, James -- I had overlooked the existence of this. Small feature enhancement might be to mention it in doc in other places where static content is being talked about. - Shaun --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Portlet like features

2006-09-19 Thread [EMAIL PROTECTED]
Well - yes but most MVC type applications have a dispatcher like architecture where the request is caught by a single resource which then locates the controller to handle the request. Anyways, I think I got most of it to work (using my sparse python knowledge :-) ) but each time I tried to read

Re: Download counter?

2006-09-19 Thread Malcolm Tredinnick
On Tue, 2006-09-19 at 06:04 +, spacedman wrote: > > frank wrote: > > Sure, I could create a download button for each > > item, but that would be an extra step for the user. 'It would be nice' > > if that weren't necessary. > > BTW the downloads are static files, served by Apache. That

Re: Download counter?

2006-09-19 Thread spacedman
frank wrote: > Sure, I could create a download button for each > item, but that would be an extra step for the user. 'It would be nice' > if that weren't necessary. > BTW the downloads are static files, served by Apache. That extra > button > is looking more and more likely... At some point